Re: Problem with exceptions

2018-04-16 Thread Zajo
FYI I've isolated the problem and submitted a bug: 
https://github.com/kripken/emscripten/issues/6449

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Problem with exceptions

2018-04-12 Thread Zajo
In case it helps, the actual generated .js function where this occurs looks 
like this:

function ___cxa_rethrow() {
  var ptr = EXCEPTIONS.caught.pop();
  if (!EXCEPTIONS.infos[ptr].rethrown) {
// Only pop if the corresponding push was through 
rethrow_primary_exception
EXCEPTIONS.caught.push(ptr)
EXCEPTIONS.infos[ptr].rethrown = true;
  }
  EXCEPTIONS.last = ptr;
  throw ptr;
}

On Thursday, April 12, 2018 at 11:27:01 AM UTC-7, Zajo wrote:
>
> I get this error at run-time:
>
> exception thrown: TypeError: Cannot read property 'rethrown' of 
> undefined,TypeError: Cannot read property 'rethrown' of undefined
> at ___cxa_rethrow 
> (/Users/zajo/Desktop/ssi/re-core/bld/ems_debug/json_test-parse.js:1612:34)
> at Array.___cxa_rethrow__wrapper 
> (/Users/zajo/Desktop/ssi/re-core/bld/ems_debug/json_test-parse.js:222165:4)
> at Object.dynCall_v 
> (/Users/zajo/Desktop/ssi/re-core/bld/ems_debug/json_test-parse.js:222026:31)
> at invoke_v 
> (/Users/zajo/Desktop/ssi/re-core/bld/ems_debug/json_test-parse.js:6147:24)
> at 
> __ZN2re4json11json_detail32enforce_child_node_type_child_idERKNS0_11object_nodeEPKcbbb
>  
> (/Users/zajo/Desktop/ssi/re-core/bld/ems_debug/json_test-parse.js:104679:5)
> at Array.__ZN2re4json11child_valueIiEET_RKNS0_11object_nodeEPKc 
> (/Users/zajo/Desktop/ssi/re-core/bld/ems_debug/json_test-parse.js:16006:2)
> at Object.dynCall_iii 
> (/Users/zajo/Desktop/ssi/re-core/bld/ems_debug/json_test-parse.js:221942:40)
> at invoke_iii 
> (/Users/zajo/Desktop/ssi/re-core/bld/ems_debug/json_test-parse.js:6039:33)
> at Array.__ZN12_GLOBAL__N_116test_value_typesERN2re7testing5filesE 
> (/Users/zajo/Desktop/ssi/re-core/bld/ems_debug/json_test-parse.js:7063:12)
> at Object.dynCall_vi 
> (/Users/zajo/Desktop/ssi/re-core/bld/ems_debug/json_test-parse.js:222033:32)
> /Users/zajo/Desktop/ssi/re-core/bld/ems_debug/json_test-parse.js:113
> throw ex;
> ^
>
> Sincne it mentions rethrowing, I tried to reproduce it in the following 
> simple test, however that worked correctly:
>
> class error { };
>
> int main() {
>try {
>  throw error();
>} catch(...) {
>  try {
>throw;
>  } catch( error & ) {
>  }
>   }
>   return 0;
> }
>
> Any ideas how to fix this?
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.