PayU-EMEA / apple-pay

This library is used to decode tokens for Apple Pay.
48 stars 31 forks source link

Dedicated exception classes for various failure scenarios #10

Open willemstuursma opened 5 years ago

willemstuursma commented 5 years ago

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:

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

trydocatch commented 5 years ago

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