mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
17 lines
243 B
JavaScript
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);
|