Bug 98302 - [browser] add callback for handling errors
Summary: [browser] add callback for handling errors
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 272680 286480 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-03 11:19 EDT by Grant Gayed CLA
Modified: 2012-07-17 11:51 EDT (History)
7 users (show)

See Also:


Attachments
a test page with a javascript error (919 bytes, text/html)
2005-06-03 12:03 EDT, Grant Gayed CLA
no flags Details
screenshot of stack overflow error (7.01 KB, image/png)
2009-11-12 15:10 EST, Boris Bokowski CLA
no flags Details
snippet that causes the stack overflow error (1.49 KB, text/plain)
2009-11-12 15:12 EST, Boris Bokowski CLA
no flags Details
attaching some work here so it's not lost (3.21 KB, patch)
2012-07-17 11:51 EDT, Grant Gayed CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2005-06-03 11:19:21 EDT
Currently a page that has a javascript error (such as the page attached next) 
fails silently.  A callback for handling this should be added so that a Browser 
client can handle the error in a context-appropriate way.
Comment 1 Grant Gayed CLA 2005-06-03 11:24:48 EDT
Bug 77611 describes the spot where this can likely be hooked in IE.
Comment 2 Grant Gayed CLA 2005-06-03 12:03:22 EDT
Created attachment 22334 [details]
a test page with a javascript error
Comment 3 Grant Gayed CLA 2005-08-23 14:46:01 EDT
I cannot find Gecko api for this.  I also notice that Mozilla and Firefox don't 
show errors in their status bars like IE does, so I suspect that this is not 
currently supported.

I have not investigated WebKit support.
Comment 4 Grant Gayed CLA 2009-04-17 09:24:49 EDT
*** Bug 272680 has been marked as a duplicate of this bug. ***
Comment 5 Grant Gayed CLA 2009-08-17 10:09:35 EDT
*** Bug 286480 has been marked as a duplicate of this bug. ***
Comment 6 Boris Bokowski CLA 2009-11-12 15:09:51 EST
Comment 0 lists only JavaScript errors, but there are additional sources of errors (and perhaps warnings) which a client of Browser might want to react to, for example:

- HTTP Protocol errors (for examples see bug 272680 and bug 286480)
- Security warnings or errors (invalid certificate, mixed https/http content)
- Other runtime error dialogs, I'll attach a screenshot of one.
Comment 7 Boris Bokowski CLA 2009-11-12 15:10:22 EST
Created attachment 152100 [details]
screenshot of stack overflow error
Comment 8 Boris Bokowski CLA 2009-11-12 15:12:26 EST
Created attachment 152101 [details]
snippet that causes the stack overflow error

Just for fun, I tried to find out how many recursive calls you can make back and forth between Java and JavaScript. Haven't tried it on the Mac or on Linux.
Comment 9 Grant Gayed CLA 2012-07-17 11:51:54 EDT
Created attachment 218815 [details]
attaching some work here so it's not lost