DBException vs. SocketException

12 views
Skip to first unread message

Mick

unread,
Nov 8, 2012, 3:24:11 PM11/8/12
to mongo...@googlegroups.com
I saw examples using both exceptions, but in terms of catching all possible mongo database related errors, which one is it better, DBException or SocketException?
Thank you in advance.

Eric Milkie

unread,
Nov 8, 2012, 4:11:16 PM11/8/12
to mongo...@googlegroups.com
SocketException is a subclass of DBException (see sock.h), so to catch all exceptions just use DBException.
Reply all
Reply to author
Forward
0 new messages