Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Error Handling

Generate warnings and errors, capture data on cause of error

MuPAD Functions

error Raise a user-specified exception
getlasterror Retrieve the last error number and text
lasterror Reproduce the last error
traperror Trap errors
warning Print a warning message

Topics

Write Error and Warning Messages

When writing a procedure in MuPAD®, you can include error and warning messages in your procedure.

Handle Errors

Typically, when a MuPAD procedure encounters an error caused by evaluation of an object, the procedure terminates, the system returns to an interactive level and displays an error message.

Was this topic helpful?