|
|
Firefox Error Console links
I have a question about the display of javascript Errors in the Firefox
Error Console. Maybe not completely on-topic, but I hope someone here
might know the answer.
The Error Console will display an error when a javascript object is
thrown (and not catched).
If this is done with the normal Error object, for example:
throw new Error("my message")
then it shows the error message and a nice link that you can use to jump
to the file and line number
where the Error object was created.
I would like to know what the exact conditions are for this link to be
displayed.
I ask this because I tried to extend the Error object in many ways to
distinguish between different
exceptions, yet still have that useful link in the Error Console.
My custom Exception object is extended in such a way that "instanceof
Error" returns true. And it contains
the fileName and lineNumber properties. Yet I still see no link.
I give some javascript to show you one method I used to extend the Error
object:
************
clone = function (object)
{
function Dummy(){};
Dummy.prototype = object;
return new Dummy();
}
extend = function (superclass, subclass)
{
subclass.prototype = clone(superclass.prototype);
subclass.prototype.constructor = subclass;
}
Exception = function(error)
{
for (var p in error)
{
this[p] = error[p];
}
}
extend(Error, Exception);
Exception.prototype.toString = function()
{
return "Exception: " + this.message + "
(filename="+this.fileName+":"+this.lineNumber+")";
}
throw new Exception(Error("my exception"));
************
Kind regards,
Robert
|
|
0
|
|
|
|
Reply
|
Robert
|
5/10/2010 10:19:36 AM |
|
|
0 Replies
112 Views
(page loaded in 0.894 seconds)
Similiar Articles: Firefox is already running... - comp.unix.solaris... Firefox directly at the server console: "Firefox ... Adobe Acrobat opens links in IE not Firefox, the ... How to fix “Firefox is already running” error - www.mattcutts ... Matlab GUIDE stability issue - comp.soft-sys.matlabError using ==> drawnow UIJ_AreThereWindowShowsPending ... To contact Technical Support use the Contact Us link on ... small experiment: I open Chrome, PDF reader, Firefox ... VNC on XP and dtterm on Solaris 8 - comp.unix.solarisAt first I was getting an authentication error, and ... Sunfreeware.com has a very detailed "INSTALLING" link ... firefox cannot be killed, and more... - comp.unix.solaris ... Annoying kernel memory leak in U6? - comp.unix.solaris... Feb 11 01:58:05 tucana rpcbind: [ID 451547 daemon.error ... At 07:17 I opened the serial console (via ALOM) to see ... Cell/GSM: +46 705 18 2786 Physics Department, Link ... Installing CPM3 - comp.os.cpmBut, as Axel pointed out it's possible to get Firefox ... On manuals I would appreciate links to the best cleaned ... such as Consolas or > > Anonymous, or even Lucida Console ... Poker hand evaluator - comp.lang.javascript... merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. ... I use the standalone console shells js and v8.) There ... With SpiderMonkey / Firefox, it takes more than ten ... Firefox Mastery » Introducing the Firefox Error ConsoleYou can access it by clicking on Tools > Error_Console. The Error Console of Firefox opens in a ... Links. Firefox Tips Firefox 4. Appnews.net. Firefox 8.0 Error Console - MDN - Home of the Mozilla ProjectPages that link here; Languages. Español; Français; Polski; 日本語; MDN ... preferences you should set if you want to see errors from Firefox and extensions in the Error console. 7/15/2012 9:19:51 PM
|
|
|
|
|
|
|
|
|