Support #5257

method to catch error on connection?

Added by Rick Harding 05/26/2011 (over 10 years) ago.

Status:NewStart date:05/26/2011
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-Spent time:-
Target version:-

Description

I'm trying to figure out how to properly catch an exception such as when the db server is unavailable. I've tried binding to a connection.on('error') event, but it doesn't look like it emits one. I see 'error' emitted when a query fails, but nothing on the actual connection attempt. Am I missing the proper way to handle that?

Thanks

Also available in: Atom PDF