Skip to content

Commit

Permalink
Emit shorter, clearer message when sourcing an m-file fails (bug #62928)
Browse files Browse the repository at this point in the history
* pt-eval.cc: If parsing of sourced file fails, and error message is set,
display the existing error message rather than adding on text about
how the file could not be parsed.
  • Loading branch information
Rik committed Nov 25, 2024
1 parent 7f9bb81 commit aa05d8a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libinterp/parse-tree/pt-eval.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2189,8 +2189,7 @@ tree_evaluator::source_file (const std::string& file_name,
error (ee, "source: error sourcing file '%s'",
file_full_name.c_str ());
else
error (ee, "source: error sourcing file '%s': %s",
file_full_name.c_str (), error_message.c_str ());
error (ee, "%s", error_message.c_str ());
}
}

Expand Down

0 comments on commit aa05d8a

Please sign in to comment.