summaryrefslogtreecommitdiff
path: root/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/internal/WotonomyException.java
diff options
context:
space:
mode:
authorBenjamin Culkin <scorpress@gmail.com>2024-05-20 17:58:16 -0400
committerBenjamin Culkin <scorpress@gmail.com>2024-05-20 17:58:16 -0400
commit40a9d99496e098562f090fb7ffce9e749011b131 (patch)
tree437df24d65470582e943e494a52db8ed65a881ae /projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/internal/WotonomyException.java
parentff072dfe782f6f22123cd4ba050828d35c0d0fbd (diff)
Formatting pass
Diffstat (limited to 'projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/internal/WotonomyException.java')
-rw-r--r--projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/internal/WotonomyException.java135
1 files changed, 59 insertions, 76 deletions
diff --git a/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/internal/WotonomyException.java b/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/internal/WotonomyException.java
index e2210d0..21b47b3 100644
--- a/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/internal/WotonomyException.java
+++ b/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/internal/WotonomyException.java
@@ -22,113 +22,96 @@ import java.io.PrintStream;
import java.io.PrintWriter;
/**
-* This is a simple RuntimeException that can encapsulate
-* another throwable. Behaves as a normal RuntimeException
-* except that it prints a stack trace of the wrapped
-* throwable if one is specified.
-*
-* Intended to be used anytime you'd
-* report an exception with System.out.println: that is,
-* for debugging and non-user-visible exceptions.
-*
-* @author michael@mpowers.net
-* @author $Author: cgruber $
-* @version $Revision: 893 $
-*/
+ * This is a simple RuntimeException that can encapsulate another throwable.
+ * Behaves as a normal RuntimeException except that it prints a stack trace of
+ * the wrapped throwable if one is specified.
+ *
+ * Intended to be used anytime you'd report an exception with
+ * System.out.println: that is, for debugging and non-user-visible exceptions.
+ *
+ * @author michael@mpowers.net
+ * @author $Author: cgruber $
+ * @version $Revision: 893 $
+ */
-public class WotonomyException extends RuntimeException
-{
+public class WotonomyException extends RuntimeException {
protected String message;
protected Throwable wrappedThrowable;
-
+
/**
- * Default constructor.
- */
- public WotonomyException()
- {
+ * Default constructor.
+ */
+ public WotonomyException() {
super();
message = null;
- wrappedThrowable = null;
+ wrappedThrowable = null;
}
-
+
/**
- * Standard constructor with message.
- */
- public WotonomyException( String aMessage )
- {
- super( aMessage );
+ * Standard constructor with message.
+ */
+ public WotonomyException(String aMessage) {
+ super(aMessage);
message = aMessage;
wrappedThrowable = null;
}
-
+
/**
- * Specifies a throwable to wrap.
- */
- public WotonomyException( Throwable aThrowable )
- {
+ * Specifies a throwable to wrap.
+ */
+ public WotonomyException(Throwable aThrowable) {
super();
message = null;
wrappedThrowable = aThrowable;
}
-
+
/**
- * Specifies a message and a throwable to wrap.
- */
- public WotonomyException( String aMessage, Throwable aThrowable )
- {
- super( aMessage );
+ * Specifies a message and a throwable to wrap.
+ */
+ public WotonomyException(String aMessage, Throwable aThrowable) {
+ super(aMessage);
message = aMessage;
wrappedThrowable = aThrowable;
}
-
- /**
- * Returns the wrapped throwable.
- */
- public Throwable getWrappedThrowable()
- {
- return wrappedThrowable;
- }
-
- public void printStackTrace(PrintWriter s)
- {
- if ( message != null )
- {
- s.println( "Exception: " + message );
+
+ /**
+ * Returns the wrapped throwable.
+ */
+ public Throwable getWrappedThrowable() {
+ return wrappedThrowable;
+ }
+
+ public void printStackTrace(PrintWriter s) {
+ if (message != null) {
+ s.println("Exception: " + message);
}
- if ( wrappedThrowable != null )
- {
- wrappedThrowable.printStackTrace( s );
+ if (wrappedThrowable != null) {
+ wrappedThrowable.printStackTrace(s);
return;
}
- super.printStackTrace( s );
+ super.printStackTrace(s);
}
-
- public void printStackTrace(PrintStream s)
- {
- if ( message != null )
- {
- s.println( "Exception: " + message );
+
+ public void printStackTrace(PrintStream s) {
+ if (message != null) {
+ s.println("Exception: " + message);
}
- if ( wrappedThrowable != null )
- {
- wrappedThrowable.printStackTrace( s );
+ if (wrappedThrowable != null) {
+ wrappedThrowable.printStackTrace(s);
return;
}
- super.printStackTrace( s );
+ super.printStackTrace(s);
}
-
- public void printStackTrace()
- {
- if ( message != null )
- {
- System.err.println( "Exception: " + message );
+
+ public void printStackTrace() {
+ if (message != null) {
+ System.err.println("Exception: " + message);
}
- if ( wrappedThrowable != null )
- {
- wrappedThrowable.printStackTrace();
+ if (wrappedThrowable != null) {
+ wrappedThrowable.printStackTrace();
return;
}
super.printStackTrace();
}
-
+
}