Home > vbmeg > functions > gui > preAnalysis > meeg_processor > utility > 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.)

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

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 % Copyright (C) 2011, ATR All Rights Reserved.
0013 % License : New BSD License(see VBMEG_LICENSE.txt)
0014 
0015 msg = lasterror_struct.message;
0016 
0017 msg_filtered = [];
0018 ix = strfind(lasterror_struct.message, sprintf('\n'));
0019 if ~isempty(ix);
0020     msg_filtered = msg(ix(1)+1:end);
0021 else
0022     msg_filtered = msg;
0023 end

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005