Try/Catch

The try /catch block allows you to stop errors from being returned, and allows another block of code to execute instead of the error.

try
      tryBlock
catch exception
      catchBlock
end
The try/catch statement tries to run the code in the tryBlock, but if an error occurs, it will run the code in the catchBlock. The exception is not required but allows you to distinguish the error type (this is not currently supported.)
try
      a*2
catch 
      disp('error occurred')
end