commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1164570 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/exception/ main/java/org/apache/commons/math/exception/util/ site/xdoc/
Date Fri, 02 Sep 2011 15:07:17 GMT
Author: luc
Date: Fri Sep  2 15:07:16 2011
New Revision: 1164570

URL: http://svn.apache.org/viewvc?rev=1164570&view=rev
Log:
Added a getter to allow retrieving the exception related to an
exception context provider.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathArithmeticException.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalStateException.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUnsupportedOperationException.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUserException.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/ExceptionContextProvider.java
    commons/proper/math/trunk/src/site/xdoc/changes.xml

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathArithmeticException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathArithmeticException.java?rev=1164570&r1=1164569&r2=1164570&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathArithmeticException.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathArithmeticException.java
Fri Sep  2 15:07:16 2011
@@ -62,6 +62,11 @@ public class MathArithmeticException ext
     }
 
     /** {@inheritDoc} */
+    public Throwable getException() {
+        return this;
+    }
+
+    /** {@inheritDoc} */
     @Override
     public String getMessage() {
         return context.getMessage();

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java?rev=1164570&r1=1164569&r2=1164570&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java
Fri Sep  2 15:07:16 2011
@@ -51,6 +51,11 @@ public class MathIllegalArgumentExceptio
     }
 
     /** {@inheritDoc} */
+    public Throwable getException() {
+        return this;
+    }
+
+    /** {@inheritDoc} */
     @Override
     public String getMessage() {
         return context.getMessage();

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalStateException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalStateException.java?rev=1164570&r1=1164569&r2=1164570&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalStateException.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalStateException.java
Fri Sep  2 15:07:16 2011
@@ -73,6 +73,11 @@ public class MathIllegalStateException e
     }
 
     /** {@inheritDoc} */
+    public Throwable getException() {
+        return this;
+    }
+
+    /** {@inheritDoc} */
     @Override
     public String getMessage() {
         return context.getMessage();

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUnsupportedOperationException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUnsupportedOperationException.java?rev=1164570&r1=1164569&r2=1164570&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUnsupportedOperationException.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUnsupportedOperationException.java
Fri Sep  2 15:07:16 2011
@@ -59,6 +59,11 @@ public class MathUnsupportedOperationExc
     }
 
     /** {@inheritDoc} */
+    public Throwable getException() {
+        return this;
+    }
+
+    /** {@inheritDoc} */
     @Override
     public String getMessage() {
         return context.getMessage();

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUserException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUserException.java?rev=1164570&r1=1164569&r2=1164570&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUserException.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUserException.java
Fri Sep  2 15:07:16 2011
@@ -86,6 +86,11 @@ public class MathUserException extends R
     }
 
     /** {@inheritDoc} */
+    public Throwable getException() {
+        return this;
+    }
+
+    /** {@inheritDoc} */
     @Override
     public String getMessage() {
         return context.getMessage();

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/ExceptionContextProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/ExceptionContextProvider.java?rev=1164570&r1=1164569&r2=1164570&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/ExceptionContextProvider.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/ExceptionContextProvider.java
Fri Sep  2 15:07:16 2011
@@ -30,4 +30,10 @@ public interface ExceptionContextProvide
      * @return a reference to the exception context.
      */
     ExceptionContext getContext();
+
+    /** Get a reference to the exception to which the context relates.
+     * @return a reference to the exception to which the context relates
+     */
+    Throwable getException();
+
 }

Modified: commons/proper/math/trunk/src/site/xdoc/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/xdoc/changes.xml?rev=1164570&r1=1164569&r2=1164570&view=diff
==============================================================================
--- commons/proper/math/trunk/src/site/xdoc/changes.xml (original)
+++ commons/proper/math/trunk/src/site/xdoc/changes.xml Fri Sep  2 15:07:16 2011
@@ -52,6 +52,10 @@ The <action> type attribute can be add,u
     If the output is not quite correct, check for invisible trailing spaces!
      -->
     <release version="3.0" date="TBD" description="TBD">
+      <action dev="luc" type="add" >
+        Added a getter to allow retrieving the exception related to an exception context
+        provider. 
+      </action>
       <action dev="psteitz" type="update" issue="MATH-364" due-to="Christian Winter">
         Added erf(double,double) to Erf and used this to improve tail probability
         accuracy in NormalDistributionImpl. 



Mime
View raw message