commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject RE: [proxy] Commons-Lang Dependency...
Date Fri, 09 Sep 2005 11:32:47 GMT
What good would a runtime exception do me at that point?  The method
interceptor which contains that code is executing the method invocation in
another thread using an Executor (JDK5).  So, the runtime exception wouldn't
get back to the caller.  At best it would probably just get printed to
standard error or something.  That's why I chose to actually log the error
in the first place.

-----Original Message-----
From: Henning P. Schmiedehausen [mailto:hps@intermeta.de] 
Sent: Friday, September 09, 2005 2:49 AM
To: commons-dev@jakarta.apache.org
Subject: Re: [proxy] Commons-Lang Dependency...

Rahul Akolkar <rahul.akolkar@gmail.com> writes:

><snap/>
>-      getLog().error( "Method invocation threw an exception.", t );
>+      // What to do here?  I can't convey the failure back to the caller.
><snip/>

throw new RuntimeException(t) if you aim for JDK 1.4+

throw new RuntimeException(t.getMessage()) if you need 1.3 compatibility.

should be possible everywhere. 

	Best regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

		      4 - 8 - 15 - 16 - 23 - 42

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



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


Mime
View raw message