Index: TurbineRoleManagement.java =================================================================== RCS file: /home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/turbine/TurbineRoleManagement.java,v retrieving revision 1.8 diff -u -r1.8 TurbineRoleManagement.java --- TurbineRoleManagement.java 4 Mar 2003 00:05:13 -0000 1.8 +++ TurbineRoleManagement.java 12 Mar 2003 20:37:38 -0000 @@ -162,6 +162,7 @@ } catch(JetspeedSecurityException e) { + Log.error( "Failed to Retrieve User: " + username, e ); throw new RoleException("Failed to Retrieve User: ", e); } Criteria criteria = new Criteria(); @@ -188,6 +189,7 @@ } catch(Exception e) { + Log.error( "Failed to retrieve roles ", e ); throw new RoleException("Failed to retrieve roles ", e); } return roles.values().iterator(); @@ -214,6 +216,7 @@ } catch(Exception e) { + Log.error( "Failed to retrieve roles ", e ); throw new RoleException("Failed to retrieve roles ", e); } return roles.iterator(); @@ -247,8 +250,9 @@ } catch(Exception e) { - throw new RoleException("Failed to create role '" + - role.getName() + "'", e); + String message = "Failed to create role '" + role.getName() + "'"; + Log.error( message, e ); + throw new RoleException( message, e ); } if (cachingEnable) @@ -269,7 +273,8 @@ catch (Exception e2) { } - throw new RoleException("failed to add default PSML for Role resource", e); + Log.error( "Failed to add default PSML for Role resource", e ); + throw new RoleException("Failed to add default PSML for Role resource", e); } } @@ -297,6 +302,7 @@ catch(Exception e2) { } + Log.error( "Failed to create Role PSML", e ); throw new RoleException("Failed to create Role PSML", e); } } @@ -335,8 +341,9 @@ } catch(Exception e) { - throw new RoleException("Failed to create role '" + - role.getName() + "'", e); + String message = "Failed to create role '" + role.getName() + "'"; + Log.error( message, e ); + throw new RoleException( message, e ); } } @@ -395,8 +402,9 @@ { Log.error(sqle); } - throw new RoleException("Failed to remove role '" + - rolename + "'", e); + String message = "Failed to remove role '" + rolename + "'"; + Log.error( message, e ); + throw new RoleException( message, e ); } finally { @@ -404,7 +412,10 @@ { Torque.closeConnection(conn); } - catch (Exception e){} + catch (Exception e) + { + Log.error( "Error closing Torque connection", e ); + } } } @@ -439,7 +450,9 @@ } catch(Exception e) { - throw new RoleException("Grant role '" + rolename + "' to user '" + username + "' failed: ", e); + String message = "Grant role '" + rolename + "' to user '" + username + "' failed: "; + Log.error( message, e ); + throw new RoleException( message, e ); } } @@ -474,7 +487,9 @@ } catch(Exception e) { - throw new RoleException("Revoke role '" + rolename + "' to user '" + username + "' failed: ", e); + String message = "Revoke role '" + rolename + "' to user '" + username + "' failed: "; + Log.error( message, e ); + throw new RoleException( message, e ); } } @@ -515,8 +530,9 @@ } catch(Exception e) { - throw new RoleException("Failed to check role '" + - rolename + "'", e); + String message = "Failed to check role '" + rolename + "'"; + Log.error( message, e ); + throw new RoleException( message, e ); } return ( roles.size() > 0 ); } @@ -545,8 +561,9 @@ } catch(Exception e) { - throw new RoleException("Failed to retrieve role '" + - rolename + "'", e); + String message = "Failed to retrieve role '" + rolename + "'"; + Log.error( message, e ); + throw new RoleException( message, e); } if ( roles.size() > 1 ) { @@ -599,6 +616,7 @@ } catch(Exception e) { + Log.error( "Failed to check account's presence", e ); throw new RoleException( "Failed to check account's presence", e); }