☰
Debian Codegraph
@
20130227+rhino-3
/
/
rhino
/
testsrc
/
jstests
/
exceptionJson.jstest
☽
☼
rhino/testsrc/jstests/exceptionJson.jstest
code
plain
raw
MPL-2.0
1999-2015, Mozilla
debian/copyright
1
// Ensure that a NativeError can be converted to JSON.
2
3
try {
4
somethingUndefined();
5
} catch (ud) {
6
JSON.stringify(ud);
7
}
8
9
try {
10
throw new Error("Error with a message");
11
} catch (ex) {
12
JSON.stringify(ex);
13
}
14
15
"success";