Hi everyone,

I'm not quite sure how to handle this type of thing.  I have a method
that searches for a user in our LDAP by way of a Person model's
username attribute:

@ldap_person = @person.get_ldap_user

This method, noce done with the LDAP wrangling, returns the user entry
(an LDAP::Entry object) as a hash:

return conn.search2(UnifiedLDAP::PEOPLE_DN, LDAP::LDAP_SCOPE_SUBTREE,
filter, self.ldap_attributes)[0].to_hash

This works, and, of course, there SHOULD be an LDAP entry
corresponding to that Person, but if there isn't or LDAP is
unreachable, I want to report that.  Am I doing the wrong thing in
returning a hash?  Where should I be catching exceptions?  How should
I be then be dealing with them?

This is part of a Rails app, but I don't think that part is important,
so I'm sticking to this list.  When I pass @ldap_person to the view,
though, and @ldap_person is an exception, obviously, this doesn't
work.

Thank you!

Sean