commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject Re: 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 20:46:07 GMT
Hi Luc.

> 
> 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();
> +
>  }

This new method does not seem to be used inside CM. For what do you need it?
I'm asking because it does not seem to be a good fit there: Although the
"ExceptionContextProvider" is implemented by exceptions, it is not strictly
true that any implementation of "ExceptionContextProvider" would be able to
refer to an exception...

Moreover, if only exceptions can implement "ExceptionContextProvider", then
this method:
---CUT---
public Throwable getException() {
   return this;
}
---CUT---
is pretty much redundant since it'll hand you the object which you already
have.

Or did I miss something?


Best,
Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message