Multiple cause exception handling
Show older comments
Consider this script,
try
% code
catch e
fprintf(1,'Exception identifier: %s\n',e.identifier);
fprintf(1,'Exception message: %s\n',e.message);
end
When using try & catch to handle exceptions, if exception has multiple causes, it throws something like this:
Exception occurred!
Exception identifier: MATLAB:MException:MultipleErrors
Exception message: Error due to multiple causes.
Any way to parse the exceptions out one-by-one?
Accepted Answer
More Answers (0)
Categories
Find more on Structures in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!