This commit is contained in:
Bruce Mitchener 2014-01-18 13:43:39 +07:00
Родитель f138d08629
Коммит 7b47897f85
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -22,9 +22,9 @@ void setjmp_func(jmp_state* s, int level) {
s->jmp = c_jmp; s->jmp = c_jmp;
setjmp_func(s, level + 1); setjmp_func(s, level + 1);
} }
catch (int catched_eid) { catch (int caught_eid) {
printf("caught %d\n", catched_eid); printf("caught %d\n", caught_eid);
if (catched_eid == c_jmp) { if (caught_eid == c_jmp) {
printf("setjmp exception execution path, level: %d, prev_jmp: %d\n", printf("setjmp exception execution path, level: %d, prev_jmp: %d\n",
level, prev_jmp); level, prev_jmp);
if (prev_jmp != -1) { if (prev_jmp != -1) {

Просмотреть файл

@ -1269,7 +1269,7 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
} }
catch (MyException & e) catch (MyException & e)
{ {
std::cout << "Catched..."; std::cout << "Caught...";
} }
try try
@ -1278,7 +1278,7 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
} }
catch (MyException e) catch (MyException e)
{ {
std::cout << "Catched..."; std::cout << "Caught...";
} }
return 0; return 0;
@ -1288,7 +1288,7 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
Settings.DISABLE_EXCEPTION_CATCHING = 0 Settings.DISABLE_EXCEPTION_CATCHING = 0
if '-O2' in self.emcc_args: if '-O2' in self.emcc_args:
self.emcc_args.pop() ; self.emcc_args.pop() # disable closure to work around a closure bug self.emcc_args.pop() ; self.emcc_args.pop() # disable closure to work around a closure bug
self.do_run(src, 'Throw...Construct...Catched...Destruct...Throw...Construct...Copy...Catched...Destruct...Destruct...') self.do_run(src, 'Throw...Construct...Caught...Destruct...Throw...Construct...Copy...Caught...Destruct...Destruct...')
def test_exception_2(self): def test_exception_2(self):
if self.emcc_args is None: return self.skip('need emcc to add in libcxx properly') if self.emcc_args is None: return self.skip('need emcc to add in libcxx properly')