/** * Creates a copied instance of this localized exception.<p> * * @param container the message container * @param cause the root cause * * @return a copied instance of this localized exception */ public CmsRuntimeException createException(CmsMessageContainer container, Throwable cause) { return new CmsRuntimeException(container, cause); }
/** * @see java.lang.Throwable#getMessage() */ @Override public String getMessage() { return getLocalizedMessage(); }
CmsRuntimeException rte = new CmsRuntimeException( Messages.get().container( Messages.ERR_SEND_EMAIL_AUTHENTICATE_2, host.getUsername(), host.getHostname())); rte.initCause(e); throw rte; CmsRuntimeException rte = new CmsRuntimeException( Messages.get().container(Messages.ERR_SEND_EMAIL_CONFIG_0)); rte.initCause(e); throw rte;
/** * Constructor with the collector param of the tag.<p> * * @param data the param attribute value of the contentload tag. * * @throws CmsLoaderException if the collector param specifies an illegal resource type. * */ public CollectorDataPropertyBased(String data) throws CmsLoaderException { try { parseParam(data); } catch (ParseException pe) { CmsRuntimeException ex = new CmsIllegalArgumentException( Messages.get().container(Messages.ERR_COLLECTOR_PARAM_DATE_FORMAT_SYNTAX_0)); ex.initCause(pe); throw ex; } }
/** * 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} */ 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); } } }
CmsRuntimeException rte = new CmsRuntimeException(Messages.get().container( Messages.ERR_SEND_EMAIL_AUTHENTICATE_2, host.getUsername(), host.getHostname())); rte.initCause(e); throw rte; CmsRuntimeException rte = new CmsRuntimeException(Messages.get().container( Messages.ERR_SEND_EMAIL_CONFIG_0)); rte.initCause(e); throw rte;
/** * Constructor with the collector param of the tag.<p> * * @param data the param attribute value of the contentload tag. * * @throws CmsLoaderException if the collector param specifies an illegal resource type. * */ public CollectorDataPropertyBased(String data) throws CmsLoaderException { try { parseParam(data); } catch (ParseException pe) { CmsRuntimeException ex = new CmsIllegalArgumentException(Messages.get().container( Messages.ERR_COLLECTOR_PARAM_DATE_FORMAT_SYNTAX_0)); ex.initCause(pe); throw ex; } }
/** * Returns an Exception of the same type as throwable if throwable is an OpenCms Exception * with the message as a MessageContainer and the throwable as a cause.<p> * * @param message the MessageContainer for the Exception to create * @param throwable the cause of the exception * * @throws CmsVfsException if throwable is not an OpenCms Exception * @throws CmsException of the same type as throwable if throwable is an OpenCms Exception */ 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); } } }
/** * Creates a copied instance of this localized exception.<p> * * @param container the message container * @param cause the root cause * * @return a copied instance of this localized exception */ public CmsRuntimeException createException(CmsMessageContainer container, Throwable cause) { return new CmsRuntimeException(container, cause); }
/** * @see java.lang.Throwable#getMessage() */ @Override public String getMessage() { return getLocalizedMessage(); }
/** * @see org.opencms.loader.I_CmsResourceLoader#service(org.opencms.file.CmsObject, org.opencms.file.CmsResource, javax.servlet.ServletRequest, javax.servlet.ServletResponse) */ @Override public void service(CmsObject cms, CmsResource file, ServletRequest req, ServletResponse res) { throw new CmsRuntimeException( Messages.get().container(Messages.ERR_SERVICE_UNSUPPORTED_1, getClass().getName())); } }
} catch (CmsRuntimeException e) { LOG.warn(e.getLocalizedMessage(), e); } catch (Throwable e) { LOG.error(e.getLocalizedMessage(), e);
/** * @see org.opencms.loader.I_CmsResourceLoader#service(org.opencms.file.CmsObject, org.opencms.file.CmsResource, javax.servlet.ServletRequest, javax.servlet.ServletResponse) */ public void service(CmsObject cms, CmsResource resource, ServletRequest req, ServletResponse res) { throw new CmsRuntimeException( Messages.get().container(Messages.ERR_SERVICE_UNSUPPORTED_1, getClass().getName())); }
/** * Updates the cache entry for the given published resource.<p> * * @param res a published resource */ public void update(CmsPublishedResource res) { try { update(res.getStructureId(), res.getRootPath(), res.getType(), res.getState()); } catch (CmsRuntimeException e) { // may happen during import of org.opencms.ade.configuration module LOG.warn(e.getLocalizedMessage(), e); } }
/** * Sets if the subscription functionality is enabled.<p> * * @param enabled the flag indicating if the subscription functionality is enabled */ public void setEnabled(String enabled) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0)); } m_enabled = Boolean.valueOf(enabled).booleanValue(); }
/** * Updates the cache entry for the given resource.<p> * * @param res the resource for which the cache entry should be updated */ public void update(CmsResource res) { try { update(res.getStructureId(), res.getRootPath(), res.getTypeId(), res.getState()); } catch (CmsRuntimeException e) { // may happen during import of org.opencms.ade.configuration module LOG.warn(e.getLocalizedMessage(), e); } }
/** * Sets if the publish queue is re-initialized on startup.<p> * * @param publishQueuePersistance the persistence flag, parsed as <code>boolean</code> */ public void setPublishQueuePersistance(String publishQueuePersistance) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishQueuePersistance = Boolean.valueOf(publishQueuePersistance).booleanValue(); }
LOG.debug(ex.getLocalizedMessage(), ex);
/** * @see org.opencms.loader.I_CmsResourceLoader#service(org.opencms.file.CmsObject, org.opencms.file.CmsResource, javax.servlet.ServletRequest, javax.servlet.ServletResponse) */ public void service(CmsObject cms, CmsResource file, ServletRequest req, ServletResponse res) { throw new CmsRuntimeException( Messages.get().container(Messages.ERR_SERVICE_UNSUPPORTED_1, getClass().getName())); } }
LOG.debug(ex.getLocalizedMessage(), ex);