code: private Result renderInternalError(Context context, Route route, Throwable e) {
          Throwable localException;
  
          // If the template is not there, just wrap the exception within a JSON Object.
          if (internalerror == null) {
              return internalServerError(e);
          }
  
  
          // Manage ITE
          if (e instanceof InvocationTargetException) {
              localException = ((InvocationTargetException) e).getTargetException();
          } else {
              localException = e;
          }
  
          // Retrieve the cause if any.
          String cause;
          StackTraceElement[] stack;
          if (localException.getCause() != null) {
              cause = localException.getCause().getMessage();
              stack = localException.getCause().getStackTrace();
          } else {
              cause = localException.getMessage();
              stack = localException.getStackTrace();
          }
  
          // Retrieve the file name.
          String fileName = null;
          int line = -1;
          if (stack != null && stack.length != 0) {
              fileName = stack[0].getFileName();
              line = stack[0].getLineNumber();
          }
  
          // Remove iPOJO trace from the stack trace.
          List<StackTraceElement> cleaned = StackTraceUtils.cleanup(stack);
  
          // We are good to go !
          return internalServerError(render(internalerror,
                  "route", route,
                  "context", context,
                  "exception", localException,
                  "message", localException.getMessage(),
                  "cause", cause,
                  "file", fileName,
                  "line", line,
                  "stack", cleaned));
      }
docs: Generates the error page.
  
  @param context the context.
  @param route   the route
  @param e       the thrown error
  @return the HTTP result serving the error page