Skip to content

Commit

Permalink
core: add context to logged exceptions
Browse files Browse the repository at this point in the history
Signed-off-by: Eloi Charpentier <[email protected]>
  • Loading branch information
eckter authored and Khoyo committed Nov 7, 2024
1 parent cd4cdfb commit a92037a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@ public static OSRDError newWrongSwitchPortsError(
*/
@Override
public String getMessage() {
return message;
if (context.isEmpty()) return message;
else return String.format("%s, context=%s", message, context);
}

/** The JSON adapter for serializing and deserializing OSRDError instances. */
Expand Down

0 comments on commit a92037a

Please sign in to comment.