I largely concur with the try/catch approach already suggested by others. There is functionality built into the Parallel Computing Toolbox and MATLAB Job Server that will let you set callbacks for the state of your job, and also functionality built into the desktop to monitor job progress.
You could, for example, write a callback function that would check the state of your job when it completed and email you if an error was encountered while the job was running.
This would requre that you set up a cluster and use the Parallel Computing Toolbox to make it work -- which may or may not be something you have access to or want to get into if the already suggested solutions will meet your needs.
The following three links provide a basic sketch of what you would need to do -- establish the callback (the code that would send mail), how to submit your script to the cluster (batch), and then the properties you would query in your callback (job state is failed).
The job monitor allows you to monitor activity on your cluster in a GUI: