Assertion: catch | /r/HasProperty | e
Facets:
Source sentences:
text: try..catch works synchronously If an exception happens in “scheduled” code, like in setTimeout , then try..catch won’t catch it: try { setTimeout(function() { noSuchVariable; // script will die here }, 1000); } catch (e) { alert( "won't work" ); } That’s because the function itself is executed later, when the engine has already left the try..catch construct.
text: function readData() { let json = '{ "age": 30 }'; try { // ... blabla(); // error! } catch (e) {
text: { throw e; // rethrow (don't know how to deal with it) } } } try { readData(); } catch (e) { alert( "External catch got: