Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

Topic: debug... stop if errors or warnings
Replies: 2   Last Post: Nov 2, 2012 12:13 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: 17,944
Registered: 12/7/04
Re: debug... stop if errors or warnings
Posted: Nov 2, 2012 9:50 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"Nick " <dsfadfa@aol.com> wrote in message
news:k6us3o$s0q$1@newscl01ah.mathworks.com...
> In the debug menu under stop if errors or warnings there is an option
> "Use message identifiers (dbstop if error messageid)"
>
> I would like instead to dbstop at all errors EXCEPT a certain one,
> particularly MATLAB:MEX:genericFailure as it is quite annoying to manually
> have to exit debug mode whenever i get compiler errors


I don't know of a way to do that.

If you're attempting to create a MEX-file and if it's acceptable for that
process to fail in your application, wrap your MEX call in a TRY/CATCH
block. If the caught error's identifier is MATLAB:MEX:genericFailure, simply
continue on with your work; if it is not, RETHROW it, somewhat like the
first example on the TRY/CATCH documentation page.

http://www.mathworks.com/help/matlab/ref/try.html

However I would question whether or not it's acceptable for the MEX-file to
fail to be compiled. MATLAB in general doesn't throw errors "just because."
Errors are like pain to a human body; they're an indication of a larger
problem, meant to draw your attention so you can fix the problem.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.