code: public void throwException(CmsMessageContainer message, Throwable throwable) throws CmsVfsException, CmsException {
  
          if (throwable instanceof CmsException) {
              throw ((CmsException)throwable).createException(message, throwable);
          } else if (throwable instanceof CmsRuntimeException) {
              throw ((CmsRuntimeException)throwable).createException(message, throwable);
          } else {
              throw new CmsVfsException(message, throwable);
          }
      }
docs: Returns an exception of the same type as <code>throwable</code>, if <code>throwable</code> is an OpenCms Exception
  with the message as a {@link CmsMessageContainer} and the <code>throwable</code> as a cause.<p>
  
  @param message the message container for the exception to create
  @param throwable the cause of the exception
  
  @throws CmsException if the <code>throwable</code> parameter is not <code>null</code> and a {@link CmsException}
  @throws CmsVfsException if the <code>throwable</code> parameter is not <code>null</code> and no {@link CmsException}