db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: [jira] Created: (DERBY-1069) Client should unwrap exceptions thrown in privilege blocks rather than throwing the java.security.PrivilegedActionException
Date Wed, 01 Mar 2006 17:46:11 GMT
Daniel John Debrunner (JIRA) wrote:
> Client should unwrap exceptions thrown in privilege blocks rather than throwing the java.security.PrivilegedActionException
> ---------------------------------------------------------------------------------------------------------------------------
> 
>          Key: DERBY-1069
>          URL: http://issues.apache.org/jira/browse/DERBY-1069
>      Project: Derby
>         Type: Bug
>   Components: Network Client  
>     Reporter: Daniel John Debrunner
> 
> 
> Can lead to misunderstanding the root cause of the problem.
> 

Hi Dan,

Are you thinking of the problem that a new exception is created in the 
try-catch block around the 
'AccessController.doPrivileged(PrivilegedExceptionAction)', and thus the 
stacktrace for the original exception is "polluted"?
(or lost if the original exception is not set as cause for the new one)

If we are not to throw the 'PrivilegedActionException', I guess we are 
left with two choices:
1) Writing code for casting the 'PrivilegedActionException' to other 
exception types in the catch-block and re-throwing it.

2) Creating a new exception and setting 
'PrivilegedActionException.getException()' as cause for this.


Any opinions on the approaches above?
Have I missed anything?




--
Kristian

Mime
View raw message