Exception handling using play framework in java

java

(Rajneesh Soni) #1

I want to implement our custom Exception handling in our java application that is implemented using play framework. Can I get any example for implementing and using custom exception handling .


(Aditya Athalye) #2

Can you elaborate a little? Sounds too vague. A usecase with some code could help.


(hiro20v) #3

In HttpErrorHandler in application.conf it is possible to handle custom exceptions.
https://www.playframework.com/documentation/2.7.x/JavaErrorHandling#Handling-errors
https://www.playframework.com/documentation/2.7.x/api/java/play/http/DefaultHttpErrorHandler.html

My implementation example.
application.conf
ErrorHandler.java