pjs.Error() Constructor
The pjs.Error() constructor instantiates a Profound.js error object. It is derived from the JavaScript Error() object, but has additional features that map errors to status codes.
Parameters
Error or status code
Status code (available when giving custom error message)
Examples
throw new pjs.Error(9999); // Program exception in system routine.
throw new pjs.Error("Something bad happened.", 9999);
Â
var myErr = new pjs.Error("It's bad!", 9999);
// Set internal error flag
pjs.setError(myErr);
Â
// Throw JavaScript error
throw myErr;
Some documentation pages have recently moved to a new section: Profound AppDev. If you are having trouble finding specific pages, try the documentation search capability or reach out to our Support team!