-
Notifications
You must be signed in to change notification settings - Fork 97
Make ModAsset.Deserialize throw exceptions on failure
#844
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
base: dev
Are you sure you want to change the base?
Make ModAsset.Deserialize throw exceptions on failure
#844
Conversation
|
I guess we need to search for mods using ModAsset.Deserialize to pull this PR out of review hell? |
|
I decompiled all mods and none of them seem to use |
|
nevermind, I grepped |
|
An explicit exception seems like an overall benefit for SMH, the Eevee skinmod and AchievementHelper, so I'd leave them be. |
|
Should this PR be revived? Do we have any other cases of ModAsset.Deserialize? @maddie480 |
ModAsset.Deserialize<T>()usesModAsset.TryDeserialize<T>(out T), which suppresses all exceptions when deserializing YAML.This can hinder debugging if deserialization is failing for whatever reason, as the exception info is now lost.
This PR causes
ModAsset.Deserialize<T>()to now throw exceptions, if deserialization fails.(Mods depending on
ModAsset.Deserialize<T>()could break because of that, which is why this is a draft.)