Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: debug... stop if errors or warnings
Posted:
Nov 2, 2012 12:13 PM
|
|
it throws an error when you mex something and it fails to compile due to errors in the C-code. wrapping it in a try catch is a good idea, I'll do that. it's just a bit cumbersome
"Steven_Lord" <slord@mathworks.com> wrote in message <k70j3s$1cm$1@newscl01ah.mathworks.com>... > > > "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
|
|
|
|