Merge pull request #67 from ZandercraftGames/fix/load-exceptions
Fix KeyError in exception handling on error when loading a track.
This commit is contained in:
commit
f1609f7049
|
|
@ -733,7 +733,7 @@ class Node:
|
||||||
)
|
)
|
||||||
|
|
||||||
elif load_type in ("LOAD_FAILED", "error"):
|
elif load_type in ("LOAD_FAILED", "error"):
|
||||||
exception = data["exception"]
|
exception = data["data"] if self._version.major >= 4 else data["exception"]
|
||||||
raise TrackLoadError(
|
raise TrackLoadError(
|
||||||
f"{exception['message']} [{exception['severity']}]",
|
f"{exception['message']} [{exception['severity']}]",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue