1 31 32 package org.opencms.main; 33 34 import org.opencms.i18n.CmsMessageContainer; 35 36 49 public class CmsInitException extends CmsRuntimeException { 50 51 52 private static final long serialVersionUID = 7705928617426913316L; 53 54 55 private boolean m_newError; 56 57 62 public CmsInitException(CmsMessageContainer container) { 63 64 this(container, true); 65 } 66 67 73 public CmsInitException(CmsMessageContainer container, boolean newError) { 74 75 super(container); 76 m_newError = newError; 77 if (m_newError) { 78 setErrorCondition(); 79 } 80 } 81 82 88 public CmsInitException(CmsMessageContainer container, Throwable cause) { 89 90 super(container, cause); 91 m_newError = true; 92 setErrorCondition(); 93 } 94 95 98 public CmsRuntimeException createException(CmsMessageContainer container, Throwable cause) { 99 100 return new CmsInitException(container, cause); 101 } 102 103 108 public boolean isNewError() { 109 110 return m_newError; 111 } 112 113 117 private void setErrorCondition() { 118 119 CmsMessageContainer errorCondition = getMessageContainer(); 120 OpenCmsCore.setErrorCondition(errorCondition); 121 } 122 } 123 | Popular Tags |