Whenever I raise a NamedError, Firefox and IE tell me the error is
'uncaught'. But if I raise a standard javascript error, I don' have
this problem.

The standard error displays the message in a prettier manner and most
of the time I can have access to the error stack. I don't have theses
features with the NamedError.

Here is an little code snippet:

MyTest = function(param) {
  bindMethods(this);

  if (param == 1)
    this._raise_a_named_error();
  else
    this._raise_a_standard_error();
};

MyTest.prototype = {
  _raise_a_named_error: function() {
    var err = new NamedError("TestException");
    err.message = "a named error";
    throw err;
  },

  _raise_a_standard_error: function() {
    throw new Error("a standard error");
  }
};

// test code:
a1 = new MyTest();
a2 = new MyTest(1);


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

Reply via email to