Closed (fixed)
Project:
MongoDB
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
11 Oct 2011 at 13:40 UTC
Updated:
13 Jul 2012 at 00:41 UTC
Jump to comment: Most recent file
Possibly need try catch around methods.
For example...
PHP Fatal error: Uncaught exception 'MongoCursorException' with message 'couldn't connect to any servers in the list' in mongodb/mongodb_watchdog/mongodb_watchdog.module:110
PHP Fatal error: Uncaught exception 'MongoCursorException' with message 'couldn't send query: Broken pipe' in mongodb/mongodb_watchdog/mongodb_watchdog.module:111
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | maint.png | 13.85 KB | chx |
| #5 | 1306074.exception-handling-5.patch | 2.29 KB | phayes |
| #3 | mongodb_wsod_1306074-2.patch | 3.22 KB | phayes |
| #1 | mongodb_wsod_1306074-1.patch | 30.62 KB | zeisllo |
Comments
Comment #1
zeisllo commentedComment #2
phayes commentedIt looks like the patch does not apply to the latest 6.x version in git. I'll be re-rolling it.
Comment #3
phayes commentedAttached is a patch that should apply cleanly to the latest dev. It is also a much smaller and less ambitious patch. Let's get this in place first then go from there.
Comment #4
chx commentedThanks for working on this! However, fixes go upstream and get backported from there. Also, please adhere to Drupal coding standards. http://drupal.org/coding-standards/
Comment #5
phayes commentedHere's the first-cut of a patch again 7.x-1.x. It's a marginal improvement, but there is a lot more work to be done.
grep -RFn "mongodb_collection(" * | wc -lshows 69 places where we need to implement exception handling for when mongodb_collection returns FALSEComment #6
chx commentedTaking this over.
Comment #7
chx commentedSo, returning as if nothing happened and just watchdogging is not a good idea. Throwing an exception is the right thing to do we just need to make sure that Drupal can handle it and there is not another exception thrown while at it. I have added code to make this happen.
phayes, your work was not in vain: it made me realize what to do -- if 69 places need patching that's wrong.
Comment #8
chx commented