Skip to content

Commit

Permalink
remove no longer needed bad_exception hack; fixes #2560; 1.21.6
Browse files Browse the repository at this point in the history
  • Loading branch information
kripken committed Jul 22, 2014
1 parent 0efb852 commit 803d923
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion emscripten-version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1.21.5
1.21.6

2 changes: 0 additions & 2 deletions system/lib/libcxxabi/src/exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const char* exception::what() const _NOEXCEPT
return "std::exception";
}

#ifndef __EMSCRIPTEN__
// bad_exception

bad_exception::~bad_exception() _NOEXCEPT
Expand All @@ -36,7 +35,6 @@ const char* bad_exception::what() const _NOEXCEPT
{
return "std::bad_exception";
}
#endif

} // std

Expand Down
3 changes: 3 additions & 0 deletions tests/core/test_exceptions_std.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ int main() {
printf("what? %s\n", e.what());
printf("caught std::exception\n");
}
catch (int x) {
throw std::bad_exception();
}
return 0;
}
1 change: 1 addition & 0 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,7 @@ def test_exceptions_multi(self):
def test_exceptions_std(self):
if self.emcc_args is None: return self.skip('requires emcc')
Settings.DISABLE_EXCEPTION_CATCHING = 0
Settings.ERROR_ON_UNDEFINED_SYMBOLS = 1
self.emcc_args += ['-s', 'SAFE_HEAP=0']

test_path = path_from_root('tests', 'core', 'test_exceptions_std')
Expand Down

0 comments on commit 803d923

Please sign in to comment.