code: public <T extends Throwable> Micronaut mapError(Class<T> exception, Function<T, Integer> mapper) {
          this.exitHandlers.put(exception, (Function<Throwable, Integer>) mapper);
          return this;
      }
docs: Maps an exception to the given error code.
  
  @param exception The exception
  @param mapper    The mapper
  @param <T>       The exception type
  @return This application