MATLAB Function Reference
  Go to function:
    Search    Help Desk 
try    See Also

Begin try block

Description

The general form of a try statement is:

try statement, ..., statement, catch statement, ..., statement end

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

catch, end, eval, evalin,



[ Previous | Help Desk | Next ]