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

Dedicated exception classes for various failure scenarios #10

Open
willemstuursma opened this issue May 28, 2019 · 1 comment
Open

Dedicated exception classes for various failure scenarios #10

willemstuursma opened this issue May 28, 2019 · 1 comment

Comments

@willemstuursma
Copy link
Collaborator

It would be great to have dedicated exceptions for various failure scenarios. Now there is only DecodingFailedException. Other failure scenarios that could use their own exception class:

  • SignatureValidationFailedException - the signature is not valid or was not created using Apple's private key
  • PaymentDataExpiredException - the payment data has expired
  • DecryptingFailureException - the data cannot be decrypted using the private key provided.

Now, we have to resort to substring matching on the exception message.

@trydocatch
Copy link
Collaborator

Hi @willemstuursma ,

That is a good idea. I'll try to see if there are any cases when it would be helpfull to throw a dedicated exception

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants