Espruino/tests/test_exception_6.js
2017-10-06 11:59:17 +01:00

17 lines
243 B
JavaScript

function b() {
throw new Error("Some Error");
return [1];
};
function a() {
return b().length>0;
}
try {
a();
} catch (e) {
console.log("--->"+e.toString());
result = e.toString() == "Error: Some Error";
}
console.log(result);