Closed Bug 624606 Opened 14 years ago Closed 14 years ago

The notifications module should handle errors on notify

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adw, Assigned: adw)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
I've been looking at the notifications module after bug 624562.  When the module is loaded, it try-catches the alerts service getter, and that catches the case where Growl is not installed.  However, when Growl is installed but not running, the alerts service getter works fine, but this error occurs on the call to showAlertNotification:

[Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: resource://jid0-83qahhf3dde04ob6bpbidvvwvxg-api-utils-lib/securable-module.js -> resource://jid0-83qahhf3dde04ob6bpbidvvwvxg-addon-kit-lib/notifications.js :: <TOP_LEVEL> :: line 47"  data: no]

I assume other platforms may fail in the same ways, and in any case the module should handle platform errors as best it can.  This patch retreats to the plain text console if necessary.

Also, the doc should explain what platforms are supported and what happens when the user's platform is not supported.
Attachment #502690 - Flags: review?(myk)
Comment on attachment 502690 [details] [diff] [review]
patch

Looks good, r=myk!
Attachment #502690 - Flags: review?(myk) → review+
https://github.com/mozilla/addon-sdk/commit/aea6cf369b30fe000715c494a6d718399dd3ba49
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0b2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: