handle case when node is not passed to error function
parent
fd09ba1fca
commit
8fdf805f1f
|
@ -193,7 +193,7 @@ end
|
||||||
|
|
||||||
%% Helper Functions
|
%% Helper Functions
|
||||||
function parsing_error(msg, line, node)
|
function parsing_error(msg, line, node)
|
||||||
if ~isempty(node)
|
if nargin == 3 && ~isempty(node)
|
||||||
error('\nERROR encountered parsing `%s` in equation on line %d: %s\n', printNode(node), line, msg);
|
error('\nERROR encountered parsing `%s` in equation on line %d: %s\n', printNode(node), line, msg);
|
||||||
else
|
else
|
||||||
error('\nERROR encountered parsing of equation on line %d: %s\n', num2str(line), msg)
|
error('\nERROR encountered parsing of equation on line %d: %s\n', num2str(line), msg)
|
||||||
|
|
Loading…
Reference in New Issue