On Mon, Jan 5, 2009 at 11:38 AM, Braydon Fuller <[email protected]> wrote:

>  Do you know where error messages go? Errors seem to pass silently.
>

That depends on a few things... if the error is an exception, ubiquity
catches it and depending on the value of
extensions.ubiquity.displayAlertOnError in about:config it will display the
exception as a notification - regardless of it's value, it will be logged in
the console. (At least, that's how I've understood it.)

If the error is not an exception, or something before ubiquity catches it,
you are hard pressed to figure out what has happened - you'll notice that my
code for bookmark is a bit strange on that account - if you try to bookmark
a chrome page, somethings errors out, but it doesn't throw an exception, or
at least not one that reaches me

While writing this email, I've just figured out that I cannot test the
function as I do, as it seems to return false in any case, so that command
will have to be altered:
CmdUtils.CreateCommand({
  name: "bookmark",
  description: "Add current document to bookmarks",
  preview: function( pblock ) {pblock.innerHTML=this.description},
  execute: function() {
    var win = CmdUtils.getWindowInsecure();
    var doc = CmdUtils.getDocument();
    try {
     win.sidebar.addPanel(doc.title, win.location.href,"");
    } catch ( e ) { displayMessage("Page could not be bookmarked!" + ((e)?"
- "+e:"")); }
  }
});

is probably better for now...

-- cers / Christian Sonne


>     Braydon
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ubiquity-firefox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ubiquity-firefox?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to