This function will send a custom error message as provided if your code encounters an error. If there is no this function, the error given will be the default error from whatscode.js
This function should be at the bottom of your code because whatscode.js will run the code from the ground up.