code: public static void handleCmsException(CmsException e) {
  
          if (e instanceof CmsVfsResourceNotFoundException) {
              throw new CmisObjectNotFoundException(e.getLocalizedMessage(), e);
          } else if (e instanceof CmsSecurityException) {
              throw new CmisUnauthorizedException(e.getLocalizedMessage(), e);
          } else {
              throw new CmisRuntimeException(e.getLocalizedMessage(), e);
          }
      }
docs: Wrap OpenCms into OpenCMIS exceptions and rethrow them.<p>
  
  @param e the exception to handle