ServiceNow try-catch error message
I've often done it this way:
try{
}}catch (ex) {
var message = ex.toString();
gs.error('ERROR is script xyz::' + message);
}
But can try it this way also:
try{
}}catch (ex) {
var message = ex.getMessage();
gs.error('ERROR is script xyz::' + message);
}
Comments
Post a Comment