Running an instance in DEV mode, without displaying exception stacks

68 Views Asked by At

I am wondering if I can keep running a Play 1.2.5 instance running in development mode, but without displaying the full exception stack to end users.

1

There are 1 best solutions below

0
On BEST ANSWER

There are two ways:

  1. Declare method with @Catch annotation in your controllers:

    @Catch(Exception.class)
    static void unexpectedErrorOccured(Throwable cause) throws Exception {
        Logger.error(cause, "Unexpected controller error");
        //render whatever you want
    }
    
  2. Change the template located in app/views/errors/500.html