code: public static IOException convertCmsException(CmsException e) {
  
          LOG.error(e.getLocalizedMessage(), e);
          if (e instanceof CmsSecurityException) {
              return new AccessDeniedException(e.getMessage(), e);
          } else if (e instanceof CmsVfsResourceAlreadyExistsException) {
              return new FileExistsException("File exists: " + e);
          } else if (e instanceof CmsVfsResourceNotFoundException) {
              return new FileNotFoundException("File does not exist: " + e);
          } else {
              return new IOException(e);
          }
      }
docs: Tries to convert a CmsException to the matching exception type from JLAN.<p>
  
  @param e the exception to convert
  @return the converted exception