Skip to content

Commit

Permalink
Improved error message (#9602)
Browse files Browse the repository at this point in the history
  • Loading branch information
casella committed Oct 27, 2022
1 parent 27b0a84 commit 1874c84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OMCompiler/Compiler/Util/Error.mo
Expand Up @@ -1112,7 +1112,7 @@ public constant ErrorTypes.Message NOTIFY_INITIALIZING_USER_LIBRARIES = ErrorTyp
public constant ErrorTypes.Message NOTIFY_PKG_ALREADY_INSTALLED = ErrorTypes.MESSAGE(617, ErrorTypes.TRANSLATION(), ErrorTypes.NOTIFICATION(),
Gettext.gettext("%s %s is already installed, skipping."));
public constant ErrorTypes.Message REINIT_IN_ALGORITHM = ErrorTypes.MESSAGE(618, ErrorTypes.TRANSLATION(), ErrorTypes.ERROR(),
Gettext.gettext("Operator reinit may not be used in an algorithm section (use flag --allowNonStandardModelica=reinitInAlgorithms to ignore)."));
Gettext.gettext("Operator reinit may not be used in an algorithm section (use translation flag --allowNonStandardModelica=reinitInAlgorithms to ignore)."));

public constant ErrorTypes.Message MATCH_SHADOWING = ErrorTypes.MESSAGE(5001, ErrorTypes.TRANSLATION(), ErrorTypes.ERROR(),
Gettext.gettext("Local variable '%s' shadows another variable."));
Expand Down
2 changes: 1 addition & 1 deletion testsuite/flattening/modelica/scodeinst/ReinitInvalid7.mo
Expand Up @@ -14,7 +14,7 @@ end ReinitInvalid7;

// Result:
// Error processing file: ReinitInvalid7.mo
// [flattening/modelica/scodeinst/ReinitInvalid7.mo:11:5-11:19:writable] Error: Operator reinit may not be used in an algorithm section (use flag --allowNonStandardModelica=reinitInAlgorithms to ignore).
// [flattening/modelica/scodeinst/ReinitInvalid7.mo:11:5-11:19:writable] Error: Operator reinit may not be used in an algorithm section (use translation flag --allowNonStandardModelica=reinitInAlgorithms to ignore).
//
// # Error encountered! Exiting...
// # Please check the error message and the flags.
Expand Down

0 comments on commit 1874c84

Please sign in to comment.