Refactor monitor and exceptions
[lgpl/argeo-commons.git] / org.argeo.util / src / org / argeo / ArgeoException.java
index 9cf91866717f9143c282478420b360ce4c6d3540..4fa296afa8b0c8a8f7dac9e977ef9dcf74e52cf6 100644 (file)
  */
 package org.argeo;
 
-/** Argeo Commons specific exception. */
+import javax.naming.OperationNotSupportedException;
+
+/**
+ * Argeo Commons specific exception.
+ * 
+ * @deprecated Use project specific exceptions or standard ones like
+ *             {@link OperationNotSupportedException},
+ *             {@link IllegalArgumentException}, etc.
+ */
+@Deprecated
 public class ArgeoException extends RuntimeException {
        private static final long serialVersionUID = 1L;
 
@@ -29,21 +38,4 @@ public class ArgeoException extends RuntimeException {
                super(message, e);
        }
 
-       /**
-        * Chain the messages of all causes (one per line, <b>starts with a line
-        * return</b>) without all the stack
-        */
-       public static String chainCausesMessages(Throwable t) {
-               StringBuffer buf = new StringBuffer();
-               chainCauseMessage(buf, t);
-               return buf.toString();
-       }
-
-       /** Recursive chaining of messages */
-       private static void chainCauseMessage(StringBuffer buf, Throwable t) {
-               buf.append('\n').append(' ').append(t.getClass().getCanonicalName())
-                               .append(": ").append(t.getMessage());
-               if (t.getCause() != null)
-                       chainCauseMessage(buf, t.getCause());
-       }
 }