Skip to content

Commit

Permalink
Slightly better validationError printing
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle committed Apr 10, 2024
1 parent 111269e commit 52ee116
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fmi2/rule-model/Validation.vdmsl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ functions
isValidFMIConfiguration: FmiModelDescription | FmiBuildDescription | FmiTerminalsAndIcons +> bool
isValidFMIConfiguration(conf) ==
if validationError <> nil
then /* @Printf("%s\n", validationError) */ false
then /* @Printf("%#s\n", validationError) */ false

elseif is_(conf, FmiModelDescription)
then inv_FmiModelDescription'(conf)
Expand All @@ -54,7 +54,7 @@ functions
isValidFMIConfigurations: [FmiModelDescription] * [FmiBuildDescription] * [FmiTerminalsAndIcons] +> bool
isValidFMIConfigurations(model, build, terminals) == allOf
([
validationError <> nil => /* @Printf("%s\n", validationError) */ false,
validationError <> nil => /* @Printf("%#s\n", validationError) */ false,

model <> nil => inv_FmiModelDescription'(model),
build <> nil => inv_FmiBuildDescription'(build),
Expand Down
4 changes: 2 additions & 2 deletions fmi3/rule-model/Validation.vdmsl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ functions
isValidFMIConfiguration: FmiModelDescription | FmiBuildDescription | FmiTerminalsAndIcons +> bool
isValidFMIConfiguration(conf) ==
if validationError <> nil
then /* @Printf("%s\n", validationError) */ false
then /* @Printf("%#s\n", validationError) */ false

elseif is_(conf, FmiModelDescription)
then inv_FmiModelDescription'(conf)
Expand All @@ -54,7 +54,7 @@ functions
isValidFMIConfigurations: [FmiModelDescription] * [FmiBuildDescription] * [FmiTerminalsAndIcons] +> bool
isValidFMIConfigurations(model, build, terminals) == allOf
([
validationError <> nil => /* @Printf("%s\n", validationError) */ false,
validationError <> nil => /* @Printf("%#s\n", validationError) */ false,

model <> nil => inv_FmiModelDescription'(model),
build <> nil => inv_FmiBuildDescription'(build),
Expand Down

0 comments on commit 52ee116

Please sign in to comment.