Project

General

Profile

« Previous | Next » 

Revision 675

Added by berkley over 23 years ago

added precise location information (class.method) to each catch statement so that errors are more easily traced.

View differences:

AuthLdap.java
104 104
      }
105 105

  
106 106
    } catch (AuthenticationException ae) {
107
      util.debugMessage("Error authenticating: " + ae);
107
      util.debugMessage("Error authenticating in AuthLdap.authenticate: " + ae);
108 108
      // NEED TO THROW THE RIGHT EXCEPTION HERE
109 109
      return false;
110 110
    } catch (NamingException e) {
111
      util.debugMessage("Naming exception while authenticating: " + e);
111
      util.debugMessage("Naming exception while authenticating in " + 
112
                        "AuthLdap.authenticate: " + e);
112 113
      // NEED TO THROW THE RIGHT EXCEPTION HERE
113 114
      return false;
114 115
    }
......
227 228
      // Close the context when we're done
228 229
      ctx.close();
229 230
    } catch (NamingException e) {
230
      System.err.println("Problem getting attributes: " + e);
231
      System.err.println("Problem getting attributes in AuthLdap.getAttributes:" 
232
                          + e);
231 233
      // NEED TO THROW THE RIGHT EXCEPTION HERE
232 234
    }
233 235

  
......
297 299
      ctx.close();
298 300
    } catch (NamingException e) {
299 301
      util.debugMessage("Naming exception while getting dn: " + e);
302
      System.out.println("Naming exception in AuthLdap.getIdentifyingName");
300 303
      // NEED TO THROW THE RIGHT EXCEPTION HERE
301 304
      return null;
302 305
    }
......
342 345
      }
343 346

  
344 347
    } catch (ConnectException ce) {
345
      System.err.println("Error connecting to LDAP server.");
348
      System.err.println("Error connecting to LDAP server in authldap.main");
346 349
    }
347 350
  }
348 351
}

Also available in: Unified diff