function CreateError(messagetest) { log.error("Error Message", messagetest) var myCustomError = error.create({ name: 'Budget Amount Issue', message: messagetest, notifyOff: false }); // This will write 'Error: WRONG_PARAMETER_TYPE Wrong parameter type selected' to the log log.error('Error: ' + myCustomError.name, myCustomError.message); throw myCustomError; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter