Home > functions > gui > preAnalysis > trial_extractor > vb_get_error_msg.m

vb_get_error_msg

PURPOSE ^

return error message string.

SYNOPSIS ^

function [msg, msg_filtered] = vb_get_error_msg(lasterror_struct)

DESCRIPTION ^

 return error message string.
 [USAGE]
    [msg, msg_filtered] = vb_filt_get_error_msg(lasterror);
 [IN]
    lasterror_struct : <<struct>> returned by "lasterror()" function.
 [OUT]
             msg : original message(it refers to lasterror_struct.message)
    msg_filtered : filtered message(This string doesn't include
                                     error filename and line.)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [msg, msg_filtered] = vb_get_error_msg(lasterror_struct)
0002 % return error message string.
0003 % [USAGE]
0004 %    [msg, msg_filtered] = vb_filt_get_error_msg(lasterror);
0005 % [IN]
0006 %    lasterror_struct : <<struct>> returned by "lasterror()" function.
0007 % [OUT]
0008 %             msg : original message(it refers to lasterror_struct.message)
0009 %    msg_filtered : filtered message(This string doesn't include
0010 %                                     error filename and line.)
0011 
0012 msg = lasterror_struct.message;
0013 
0014 msg_filtered = [];
0015 ix = strfind(lasterror_struct.message, sprintf('\n'));
0016 if ~isempty(ix);
0017     msg_filtered = msg(ix(1)+1:end);
0018 else
0019     msg_filtered = msg;
0020 end

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005