|
|
| File Information |
| Description |
Unfortunately, Matlab does not show the location of an error, when the error is rethrown in the catch clause of a try-catch block. This can be very frustrating, since the error can reside several levels deep into possibly unfamiliar code.
DISPERROR will display the error message of the last error, together with the error stack, complete with hyperlinks.
Example:
% function testdisperror
% try
% a=[1 2 3];
% b=a(4711); % Index error
% catch
% % possibly do some housekeeping here
% rethrow(lasterror);
% end
%
% >> testdisperror
% ??? Attempted to access a(4711); index out of bounds ...
%
% >> disperror
% ??? Attempted to access a(4711); index out of bounds ...
% Error in ==> testdisperror at 4 |
| MATLAB release |
MATLAB 7.1.0 (R14SP3)
|
| Other requirements |
Uses undocumented Matlab function OPENTOLINE. |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (3) |
| 01 Mar 2006 |
Malcolm Wood
|
|
|
| 01 Mar 2006 |
Malcolm Wood
|
|
|
| 01 Mar 2006 |
J Wagberg
|
|
|
|
Contact us at files@mathworks.com