The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: send an email when codes crash?
Replies: 2   Last Post: May 22, 2013 11:26 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 18,038
Registered: 12/7/04
Re: send an email when codes crash?
Posted: May 22, 2013 10:04 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Jason Park" <> wrote in message
> Hi,
> Is there a way to prompt Matlab to send an email when the current run
> crashes?

Ideally MATLAB shouldn't crash (unless you write a MEX-file that scribbles
on memory it shouldn't or dereferences a null pointer or the like; when you
write in MEX MATLAB can't stop you from shooting yourself in the foot if you
really want to.) If you can reproducibly crash MATLAB without a MEX-file
you've written in the mix, please send those steps to Technical Support so
we can investigate why it's crashing and hopefully prevent it from doing so
in the future.

> I'm using SENDMAIL but only know how to set it to send off an email when
> it finishes.

If you want MATLAB to send you an error when your program terminates due to
an error, use a TRY/CATCH block.


You could, if you're using a recent version of MATLAB, even show some
information about the failure in the email.

catch theErrorInfo

Steve Lord
To contact Technical Support use the Contact Us link on

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.