Creates an instance of SystemError.
Error code
Error message
Error code.
Check if an object is indeed a functional SystemError.
Note
Usage
// Try to load JSON
try{
loadJson();
} catch(error) {
if (SystemError.isSystemError(error)){
// If error is something that we have defined, throw a more generic error
throw new SystemError("json_load_fail", "Failed to load JSON file.");
} else {
// Rethrow the original error
throw error;
}
}
Error to check
Returns true
if is is a SystemError, false
if not.
Generated using TypeDoc
Extended system error class.