rejectedsoftware/vibe.d — pull request #170 by Dicebot (2013-01-24 14:17:29+00:00)
Title: Mongo driver error handling improvements

Main change is the one I needed personally:
1) MongoException is split to MongoDriverException and MongoDBException
2) MongoDBException wraps data from getlasterror
This allows me to make better decisions about HTTP status codes and overall behavior in server code that relies on db.

Also I added a comment to db.getLastError to prevent possible mistake I have fallen to myself and updated documentation link ( hope it is the right one ).

This pull request is not finished though, because some open questions remain:
1) checkForError and getLastError seem to duplicate the same functionality as first one does not use the latter. Is it intended?
2) Do you want me to update thrown exceptions and according docs in other mongo package parts or to keep this local?
3) What is your bet on public variable exposure? So far they are accessible as-is, I prefer to avoid trivial getters/setters and use immutable but remember seeing other approach somewhere in vibe.

I'll make according changes upon your feedback and provide final updates.