[Webkit-unassigned] [Bug 10815] New: Exception Handling - Exceptions does not go into the catch block

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Mon Sep 11 14:54:46 PDT 2006


           Summary: Exception Handling - Exceptions does not go into the
                    catch block
           Product: WebKit
           Version: 420+ (nightly)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: kem at apak.info
                CC: kem at apak.info

The code below throws an exception in Firefox, IE, and Safari,

but unfortunately even the exception is logged to the debug window in Safari,
it never goes into the catch block, therefore I cannot handle this exception.

The exception is trying to catch a bad URI.

function loadBadScript() {

        var badScript = document.createElement('script');

        try {           
                badScript.src = 'nonexistantScript.js'; 
        } catch(e) {
                alert('exception caught');


The same is true for images as well. Assigning and incorrect URI to the src of
the image does not throw an exception, we can partially handle this with
onerror property, but it is too late then.



Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list