cfmongodb
cfmongodb copied to clipboard
Handling of Mongo being down
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?
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