Rework RequestException temporarily as a less breaking change #130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a less breaking change that can function as a transition period for the full exception handling rework. Version 2.0 is still a bit off, and this will at least ease the pain of handling Gw2Sharp exceptions via the non-generic RequestException as it was meant to be in the first place, but somehow didn't end up how it was supposed to.
It's a less than ideal change due to the
Response
property that's now marked asnew
in the genericRequestException<T>
, which means that the non-genericRequestException.Response
won't be set (and is hidden) whenRequestException<T>.Response
is used instead. See the C# documentation.See #96 for the full change that will happen in v2.0, which includes a deletion of the generic variant of
RequestException<T>
.