You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 14, 2020. It is now read-only.
In my app, I want to have a specific and unique error code for each error, for example,
1000, Error while inserting user with duplicated key
1001, Error while deleting user,
...
I might have hundreds or more for all the possible errors as the app grows. Or let's say we need to implement all the codes from http://www.twilio.com/docs/errors/reference and some other customized codes.
Do I need to create a class, like UnknownResourceException, for each of this? That would be tons of classes/files. Otherwise how can I create a couple of classes but serve all these errors in some way? If so how could I do that? Thanks!
In the rest-servlet.xml, you map each status code to a class:
In my app, I want to have a specific and unique error code for each error, for example,
1000, Error while inserting user with duplicated key
1001, Error while deleting user,
...
I might have hundreds or more for all the possible errors as the app grows. Or let's say we need to implement all the codes from http://www.twilio.com/docs/errors/reference and some other customized codes.
Do I need to create a class, like UnknownResourceException, for each of this? That would be tons of classes/files. Otherwise how can I create a couple of classes but serve all these errors in some way? If so how could I do that? Thanks!