Skip to content
Snippets Groups Projects
Commit 60a14544 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Enhanced exception printing, with fprintf style messages

parent c7263fb4
No related branches found
No related tags found
No related merge requests found
function [varargout] = gtPrintException(ex, errorMessage)
% gtPrintException(ex, errorMessage)
% prints the exception information
function [varargout] = gtPrintException(ex, varargin)
% gtPrintException(ex, varargin)
% prints the exception information, where varargin is the error message and is
% passed to sprintf
outString = sprintf('\n');
if (exist('errorMessage', 'var'))
outString = [outString sprintf(['--> ' errorMessage ' <-- Error:\n'])];
if (nargin > 1)
outString = [outString '--> ' sprintf(varargin{:}) ' <-- Error:' sprintf('\n')];
outString = [outString print_exception(ex)];
else
outString = [outString sprintf('-- Error:\n')];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment