cfmongodb icon indicating copy to clipboard operation
cfmongodb copied to clipboard

Handling of Mongo being down

Open cfjedimaster opened this issue 13 years ago • 1 comments

If you run code and Mongo itself is down, the error isn't incredibly clear:

The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code. Null Pointers are another name for undefined values.

The error occurred in C:\Users\Raymond\Dropbox\websites\testingzone\deepcomment\cfmongodb\core\DBCollection.cfc: line 365 363 : } 364 : var dbo = toMongo(doc); 365 : var writeResult = collection.remove( dbo ); 366 : return writeResult; 367 : }

It seems like Mongo could handle this a bit better?

cfjedimaster avatar Aug 11 '11 15:08 cfjedimaster

Ray, do you have a test that can reproduce this which I can run? When I attempt to reproduce, if Mongo is down, I get the typical "Can't say something" or "Can't call something" errors, with this message: "couldn't connect to [Marc-PC/192.168.1.104:27017] bc:java.net.ConnectException: Connection refused: connect "

which is pretty clear to me

marcesher avatar Aug 20 '11 16:08 marcesher