/** * Invoked in prod mode when a server error occurs. * <p> * The base implementation returns {@code Results.internalServerError} with the content of {@code views.html.defaultpages.error} template. * </p> * <p> * Override this rather than [[onServerError()]] if you don't want to change Play's debug output when logging errors * in dev mode. * * @param request The request that triggered the error. * @param exception The exception. * @return a CompletionStage containing the Result. */ protected CompletionStage<Result> onProdServerError(RequestHeader request, UsefulException exception) { return CompletableFuture.completedFuture(Results.internalServerError(views.html.defaultpages.error.render(exception, request.asScala()))); }
/** * Invoked in prod mode when a server error occurs. * * Override this rather than [[onServerError()]] if you don't want to change Play's debug output when logging errors * in dev mode. * * @param request The request that triggered the error. * @param exception The exception. */ protected F.Promise<Result> onProdServerError(RequestHeader request, UsefulException exception) { return F.Promise.<Result>pure(Results.internalServerError(views.html.defaultpages.error.render(exception))); }
/** * Invoked in prod mode when a server error occurs. * <p> * The base implementation returns {@code Results.internalServerError} with the content of {@code views.html.defaultpages.error} template. * </p> * <p> * Override this rather than [[onServerError()]] if you don't want to change Play's debug output when logging errors * in dev mode. * * @param request The request that triggered the error. * @param exception The exception. * @return a CompletionStage containing the Result. */ protected CompletionStage<Result> onProdServerError(RequestHeader request, UsefulException exception) { return CompletableFuture.completedFuture(Results.internalServerError(views.html.defaultpages.error.render(exception, request.asScala()))); }
/** * Invoked in prod mode when a server error occurs. * <p> * The base implementation returns {@code Results.internalServerError} with the content of {@code views.html.defaultpages.error} template. * </p> * <p> * Override this rather than [[onServerError()]] if you don't want to change Play's debug output when logging errors * in dev mode. * * @param request The request that triggered the error. * @param exception The exception. * @return a CompletionStage containing the Result. */ protected CompletionStage<Result> onProdServerError(RequestHeader request, UsefulException exception) { return CompletableFuture.completedFuture(Results.internalServerError(views.html.defaultpages.error.render(exception, request.asScala()))); }