Skip to content
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

Merged
merged 5 commits into from
Aug 4, 2022

Conversation

sugarmanz
Copy link
Member

@sugarmanz sugarmanz commented Aug 4, 2022

Version

Published prerelease version: 0.1.1-next.0

Changelog

🐛 Bug Fix

  • enhance error state deserialization & stacktrace logging in player view model #50 (@sugarmanz)

Authors: 1

@sugarmanz sugarmanz added the patch Increment the patch version when merged label Aug 4, 2022
@sugarmanz sugarmanz enabled auto-merge (squash) August 4, 2022 01:34
?: 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)
Copy link
Contributor

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

Copy link
Member Author

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
Copy link

codecov bot commented Aug 4, 2022

Codecov Report

Merging #50 (6577939) into main (0e97d0b) will not change coverage.
The diff coverage is n/a.

@@           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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants