Documentation

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
jvx:communication:rest_exceptionhandling [2019/07/09 09:20]
admin
jvx:communication:rest_exceptionhandling [2019/07/09 09:24]
admin
Line 11: Line 11:
 If you want custom status codes, it's possible to throw **RestServiceException**. This Exception class supports custom status codes and error messages. If you want custom status codes, it's possible to throw **RestServiceException**. This Exception class supports custom status codes and error messages.
  
 +<file java>
 +if (!isBookingAvailable())
 +{
 +    throw new RestServiceException(501,​ "The booking feature isn't yet implemented!"​);​
 +}
 +
 +...
 +</​file>​
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information