Skip to content

Commit

Permalink
Catch when listing bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinhardy committed Jun 11, 2021
1 parent c3b7f7a commit f7532c5
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions source/JndiListing.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,20 @@ private void listContext(Context ctx, String indent, int pos, boolean printGoodN
if (pos - 1 ==0){this.lastPath.clear();};
}
}
}catch (javax.naming.NoPermissionException e) {
}
catch (javax.naming.NoPermissionException e) {
myLogger.warning("Current user does not have permission on '"+appellant+"':'"+e+"'");
this.addCurrentPathToPaths(className);
this.deleteLastElementOfCurrentPath();
} catch (NamingException ex) {
}
catch (NamingException ex) {
myLogger.fine("JNDI failure: "+ex);
}
catch (Exception e){
myLogger.warning("Impossible to list bindings for '"+appellant+"': '"+e+"'");
this.addCurrentPathToPaths(className);
this.deleteLastElementOfCurrentPath();
}
if (lastPath.toArray().length>=1) {this.deleteLastElementOfCurrentPath();};
myLogger.finest("Stop the fonction listContext(). Pos="+pos+", lastPath="+this.getPrintableJndiList());
}
Expand Down Expand Up @@ -119,13 +126,3 @@ public ArrayList getDatasources(){
return datasources;
}
}










0 comments on commit f7532c5

Please sign in to comment.