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: Catching errors in custom loadobj
Replies: 1   Last Post: Nov 28, 2012 3:08 PM

Advanced Search

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

Posts: 93
Registered: 12/6/04
Re: Catching errors in custom loadobj
Posted: Nov 28, 2012 3:08 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Its been a while since this was posted, so hopefully Mason you found a solution. I recently started to use the loadobj, and also agree that errors that occur here should be real matlab exceptions.

There is an undocumented use of warning that can convert specific warnings to errors. I think that can be used here. Here's an example:
warning('error','MATLAB:str2func:invalidFunctionName')

I also posted a custom solution to accomplish that involved overriding warning.m itelf, posted on stackoverflow: http://stackoverflow.com/questions/9431743/conversion-of-warnings-to-errors-in-matlab/12698177#12698177



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.