-public abstract class MsoException extends Exception
-{
- private static final long serialVersionUID = 1L;
+public abstract class MsoException extends Exception {
+ private static final long serialVersionUID = 1L;
- protected MsoExceptionCategory category = MsoExceptionCategory.INTERNAL;
- protected String context = null;
-
- protected MsoException (String message) {
- super(message);
- }
-
- protected MsoException (String message, Throwable t) {
- super(message,t);
- }
-
- public MsoExceptionCategory getCategory() {
- return category;
- }
- public void setCategory (MsoExceptionCategory category) {
- this.category = category;
- }
-
- public String getContext () {
- return context;
- }
- public void setContext (String context) {
- this.context = context;
- }
- public void addContext (String ctx) {
- if (this.context != null)
- this.context = ctx + ":" + this.context;
- else
- this.context = ctx;
- }
-
- public String getContextMessage () {
- if (this.context == null)
- return getMessage();
- else
- return "[" + context + "] " + getMessage();
- }
+ protected MsoExceptionCategory category = MsoExceptionCategory.INTERNAL;
+ protected String context = null;
+
+ protected MsoException(String message) {
+ super(message);
+ }
+
+ protected MsoException(String message, Throwable t) {
+ super(message, t);
+ }
+
+ public MsoExceptionCategory getCategory() {
+ return category;
+ }
+
+ public void setCategory(MsoExceptionCategory category) {
+ this.category = category;
+ }
+
+ public String getContext() {
+ return context;
+ }
+
+ public void setContext(String context) {
+ this.context = context;
+ }
+
+ public void addContext(String ctx) {
+ if (this.context != null)
+ this.context = ctx + ":" + this.context;
+ else
+ this.context = ctx;
+ }
+
+ public String getContextMessage() {
+ if (this.context == null)
+ return getMessage();
+ else
+ return "[" + context + "] " + getMessage();
+ }
}