All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rhino1.7.7.testsrc.jstests.exceptionJson.jstest Maven / Gradle / Ivy

Go to download

Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically embedded into Java applications to provide scripting to end users.

There is a newer version: 1.7.15
Show newest version
// Ensure that a NativeError can be converted to JSON.

try {
  somethingUndefined();
} catch (ud) {
  JSON.stringify(ud);
}

try {
  throw new Error("Error with a message");
} catch (ex) {
  JSON.stringify(ex);
}

"success";




© 2015 - 2024 Weber Informatics LLC | Privacy Policy