disperror

버전 1.0.0.0 (1.29 KB) 작성자: Jerker Wagberg
Display latest error message and where the error occured.
다운로드 수: 1.2K
업데이트 날짜: 2006/2/28

라이선스 없음

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

인용 양식

Jerker Wagberg (2024). disperror (https://www.mathworks.com/matlabcentral/fileexchange/10181-disperror), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R14SP3
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0