handle case when node is not passed to error function

time-shift
Houtan Bastani 2019-02-05 19:36:11 +01:00
parent fd09ba1fca
commit 8fdf805f1f
No known key found for this signature in database
GPG Key ID: 000094FB955BE169
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ end
%% Helper Functions
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);
else
error('\nERROR encountered parsing of equation on line %d: %s\n', num2str(line), msg)