Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

disp (MException) - Display MException object

Syntax

disp(ME)
disp(ME.property)

Description

disp(ME) displays all properties (fields) of MException object ME.

disp(ME.property) displays the specified property of MException object ME.

Examples

Using the surf command without input arguments throws an exception. Use disp to display the identifier, message, stack, and cause properties of the MException object:

try
   surf
catch ME
   disp(ME)
end

	MException object with properties:

    identifier: 'MATLAB:nargchk:notEnoughInputs'
       message: 'Not enough input arguments.'
         stack: [1x1 struct]
         cause: {}

Display only the stack property:

disp(ME.stack)
    file: 'X:\bat\Akernel\perfect\matlab\toolbox\matlab\
graph3d\surf.m'
    name: 'surf'
    line: 54

See Also

try, catch, error, assert, MException, getReport(MException), throw(MException), rethrow(MException), throwAsCaller(MException), addCause(MException), isequal(MException), eq(MException), ne(MException), last(MException),

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS