code: public static BaseException translateException(Exception exception) {
          if (exception instanceof BaseException) {
              return (BaseException) exception;
          } else {
              for (SeedExceptionTranslator exceptionTranslator : exceptionTranslators) {
                  if (exceptionTranslator.canTranslate(exception)) {
                      return exceptionTranslator.translate(exception);
                  }
              }
              return SeedException.wrap(exception, CoreErrorCode.UNEXPECTED_EXCEPTION);
          }
      }
docs: Translates any exception that occurred in the application using an extensible exception mechanism.
  
  @param exception the exception to handle.
  @return the translated exception.