MATLAB Function Reference    
catch

Begin catch block

Description

The general form of a try statement is:

Normally, only the statements between the try and catch are executed. However, if an error occurs while executing any of the statements, the error is captured into lasterr, and the statements between the catch and end are executed. If an error occurs within the catch statements, execution stops unless caught by another try...catch block. The error string produced by a failed try block can be obtained with lasterr.

See Also

end, eval, evalin, try


  cat caxis