Closed Bug 418346 Opened 16 years ago Closed 6 years ago

Exceptions give poor error messages and no stack trace

Categories

(Core :: XPConnect, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: johnjbarton, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: testcase, Whiteboard: [firebug-p3])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12

The attached testcase has a single line script:
  document.body.appendChild();
It causes a exception which arrives in the consoleService thus:
[message]=[JavaScript Error: "uncaught exception: [Exception... "Not enough arguments"  nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)"  location: "JS frame :: http://localhost:63636/EclipseWorkspace/FireclipseTests/WebContent/UncaughtException.html :: <TOP_LEVEL> :: line 10"  data: no]"];

Now this can be parsed but there does not seem to be any description of the format so I just have to guess and hope.

More, much more important there is no stack trace. An exception with out a stack trace, I thought we got past that ;-).


Reproducible: Always

Steps to Reproduce:
1.
2.
3.



The entire test file:
----
<html>
<body>
<h1>Uncaught Exception Error Message Test</h1>
<pre>
[message]=[JavaScript Error: "uncaught exception: [Exception... "Not enough arguments"  nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)"  location: "JS frame :: http://localhost:63636/EclipseWorkspace/FireclipseTests/WebContent/UncaughtException.html :: <TOP_LEVEL> :: line 10"  data: no]"];

</pre>
</body>
<script>
document.body.appendChild();
</script>
</html>
Would be nice if XPConnect created better exception objects here!
Status: UNCONFIRMED → NEW
Component: Error Console → XPConnect
Ever confirmed: true
Product: Firefox → Core
QA Contact: error.console → xpconnect
Severity: normal → enhancement
Whiteboard: [firebug-p1]
Version: unspecified → Trunk
Whiteboard: [firebug-p1] → [firebug-p3]
Keywords: testcase
Blocks: 435025
This particular testcase now displays "TypeError: Not enough arguments to Node.appendChild. @ https://bug418346.bugzilla.mozilla.org/attachment.cgi?id=304157:10".

This seems to happen thanks to the WebIDL bindings, but I'm not sure if the plan is to migrate everything over to the new bindings.
I believe the plan is to convert everything that can be used on a webpage.  There will still be chrome-only stuff on old DOM bindings.
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: