Home > data-vis > supporting_functions > format_error_message.m

format_error_message

PURPOSE ^

SYNOPSIS ^

function format_error_message(error_ME, prefix)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function format_error_message(error_ME, prefix)
0002 if ~exist('prefix', 'var') || isempty(prefix)
0003     prefix = '';
0004 end
0005 towrite = sprintf('%s\t%s\t\t\n', prefix, error_ME.message);
0006 for s = 1:length(error_ME.stack)
0007     towrite = cat(2, towrite, sprintf('\t\t%s\t%d\n', error_ME.stack(s).file, error_ME.stack(s).line));
0008 end
0009 fprintf('%s', towrite);
0010 end

Generated on Wed 24-May-2017 00:00:56 by m2html © 2005