-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance error state deserialization & stacktrace logging in player view model #50
Conversation
?: PlayerException(node.getString("error") ?: "unable to determine error") | ||
override val error: PlayerException get() = when (val rawError = node["error"]) { | ||
is PlayerException -> rawError | ||
is Exception -> PlayerException(rawError.message ?: "", rawError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, when do these two cases come into play
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more for completeness than anything. I actually think that Graal works this way and is able to spit up the original exception, which may or may not be a PlayerException
, but that could be wrong. If Node
internals change in the future with some introspection for Node
children that are error-like and try to deserialize automatically, this will account for that.
Codecov Report
@@ Coverage Diff @@
## main #50 +/- ##
=======================================
Coverage 77.32% 77.32%
=======================================
Files 130 130
Lines 4427 4427
Branches 1093 1093
=======================================
Hits 3423 3423
Misses 727 727
Partials 277 277 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Version
Published prerelease version:
0.1.1-next.0
Changelog
🐛 Bug Fix
Authors: 1