Fix get_by_name to not swallow all database errors

This causes generic database errors to bubble up rather than returning a
LookupException.
Merge pull request #56 from sloppyfocus/better_exceptions

Fix get_by_name to not swallow all database errors