⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 203309 in webkit


Ignore:
Timestamp:
Jul 15, 2016, 5:04:42 PM (10 years ago)
Author:
beidson@apple.com
Message:

Change toString() behavior for exceptions constructed with "createWithDescriptionAsMessage".
https://bugs.webkit.org/show_bug.cgi?id=159839

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • IndexedDB-private-browsing/idbindex_get7-expected.txt:
  • IndexedDB-private-browsing/idbindex_getKey7-expected.txt:
  • IndexedDB-private-browsing/idbindex_openCursor2-expected.txt:
  • IndexedDB-private-browsing/idbindex_openKeyCursor3-expected.txt:
  • web-platform-tests/IndexedDB/idbindex_get7-expected.txt:
  • web-platform-tests/IndexedDB/idbindex_getKey7-expected.txt:
  • web-platform-tests/IndexedDB/idbindex_openCursor2-expected.txt:
  • web-platform-tests/IndexedDB/idbindex_openKeyCursor3-expected.txt:

Source/WebCore:

No new tests (Covered by changes to existing tests).

This is the first step towards extended exception messages for all exception types.

  • dom/ExceptionBase.cpp:

(WebCore::ExceptionBase::ExceptionBase):
(WebCore::ExceptionBase::toString):

  • dom/ExceptionBase.h:

LayoutTests:

  • storage/indexeddb/modern/createobjectstore-failures-expected.txt:
  • storage/indexeddb/modern/createobjectstore-failures-private-expected.txt:
  • storage/indexeddb/modern/double-abort-expected.txt:
  • storage/indexeddb/modern/double-abort-private-expected.txt:
  • storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt:
  • storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-private-expected.txt:
  • storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt:
  • storage/indexeddb/modern/idbdatabase-transaction-failures-private-expected.txt:
Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r203308 r203309  
     12016-07-15  Brady Eidson  <beidson@apple.com>
     2
     3        Change toString() behavior for exceptions constructed with "createWithDescriptionAsMessage".
     4        https://bugs.webkit.org/show_bug.cgi?id=159839
     5
     6        Reviewed by Alex Christensen.
     7
     8        * storage/indexeddb/modern/createobjectstore-failures-expected.txt:
     9        * storage/indexeddb/modern/createobjectstore-failures-private-expected.txt:
     10        * storage/indexeddb/modern/double-abort-expected.txt:
     11        * storage/indexeddb/modern/double-abort-private-expected.txt:
     12        * storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt:
     13        * storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-private-expected.txt:
     14        * storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt:
     15        * storage/indexeddb/modern/idbdatabase-transaction-failures-private-expected.txt:
     16
    1172016-07-15  Brent Fulgham  <bfulgham@apple.com>
    218
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r203235 r203309  
     12016-07-15  Brady Eidson  <beidson@apple.com>
     2
     3        Change toString() behavior for exceptions constructed with "createWithDescriptionAsMessage".
     4        https://bugs.webkit.org/show_bug.cgi?id=159839
     5
     6        Reviewed by Alex Christensen.
     7
     8        * IndexedDB-private-browsing/idbindex_get7-expected.txt:
     9        * IndexedDB-private-browsing/idbindex_getKey7-expected.txt:
     10        * IndexedDB-private-browsing/idbindex_openCursor2-expected.txt:
     11        * IndexedDB-private-browsing/idbindex_openKeyCursor3-expected.txt:
     12        * web-platform-tests/IndexedDB/idbindex_get7-expected.txt:
     13        * web-platform-tests/IndexedDB/idbindex_getKey7-expected.txt:
     14        * web-platform-tests/IndexedDB/idbindex_openCursor2-expected.txt:
     15        * web-platform-tests/IndexedDB/idbindex_openKeyCursor3-expected.txt:
     16
    1172016-07-14  Youenn Fablet  <youenn@apple.com>
    218
  • trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_get7-expected.txt

    r198394 r203309  
    22FAIL IDBIndex.get() - throw TransactionInactiveError on aborted transaction assert_throws: function "function (){
    33            index.get("data");
    4         }" threw object "Error: Failed to execute 'get' on 'IDBIndex': The transac..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
     4        }" threw object "TransactionInactiveError (DOM IDBDatabase Exception): Fai..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
    55
  • trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_getKey7-expected.txt

    r198394 r203309  
    22FAIL IDBIndex.getKey() - throw TransactionInactiveError on aborted transaction assert_throws: function "function (){
    33            index.getKey("data");
    4         }" threw object "Error: Failed to execute 'getKey' on 'IDBIndex': The tran..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
     4        }" threw object "TransactionInactiveError (DOM IDBDatabase Exception): Fai..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
    55
  • trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_openCursor2-expected.txt

    r198394 r203309  
    22FAIL IDBIndex.openCursor() - throw TransactionInactiveError on aborted transaction assert_throws: function "function (){
    33            index.openCursor();
    4         }" threw object "Error: Failed to execute 'openCursor' on 'IDBIndex': The ..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
     4        }" threw object "TransactionInactiveError (DOM IDBDatabase Exception): Fai..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
    55
  • trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_openKeyCursor3-expected.txt

    r198394 r203309  
    22FAIL IDBIndex.openKeyCursor() - throw TransactionInactiveError on aborted transaction assert_throws: function "function (){
    33            index.openKeyCursor();
    4         }" threw object "Error: Failed to execute 'openKeyCursor' on 'IDBIndex': T..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
     4        }" threw object "TransactionInactiveError (DOM IDBDatabase Exception): Fai..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
    55
  • trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_get7-expected.txt

    r200309 r203309  
    22FAIL IDBIndex.get() - throw TransactionInactiveError on aborted transaction assert_throws: function "function (){
    33            index.get("data");
    4         }" threw object "Error: Failed to execute 'get' on 'IDBIndex': The transac..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
     4        }" threw object "TransactionInactiveError (DOM IDBDatabase Exception): Fai..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
    55
  • trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getKey7-expected.txt

    r200309 r203309  
    22FAIL IDBIndex.getKey() - throw TransactionInactiveError on aborted transaction assert_throws: function "function (){
    33            index.getKey("data");
    4         }" threw object "Error: Failed to execute 'getKey' on 'IDBIndex': The tran..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
     4        }" threw object "TransactionInactiveError (DOM IDBDatabase Exception): Fai..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
    55
  • trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openCursor2-expected.txt

    r200309 r203309  
    22FAIL IDBIndex.openCursor() - throw TransactionInactiveError on aborted transaction assert_throws: function "function (){
    33            index.openCursor();
    4         }" threw object "Error: Failed to execute 'openCursor' on 'IDBIndex': The ..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
     4        }" threw object "TransactionInactiveError (DOM IDBDatabase Exception): Fai..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
    55
  • trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openKeyCursor3-expected.txt

    r200309 r203309  
    22FAIL IDBIndex.openKeyCursor() - throw TransactionInactiveError on aborted transaction assert_throws: function "function (){
    33            index.openKeyCursor();
    4         }" threw object "Error: Failed to execute 'openKeyCursor' on 'IDBIndex': T..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
     4        }" threw object "TransactionInactiveError (DOM IDBDatabase Exception): Fai..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
    55
  • trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures-expected.txt

    r195380 r203309  
    99indexedDB.open(dbname)
    1010Initial upgrade needed: Old version - 0 New version - 1
    11 Failed to create object store with both autoincrement and an empty keypath: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
     11Failed to create object store with both autoincrement and an empty keypath: InvalidAccessError (DOM IDBDatabase Exception 15): Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
    1212Object store names:
    13 Failed to create object store with both autoincrement and a sequence keypath: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
     13Failed to create object store with both autoincrement and a sequence keypath: InvalidAccessError (DOM IDBDatabase Exception 15): Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
    1414Object store names:
    15 Failed to create object store with invalid keyPath: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.
     15Failed to create object store with invalid keyPath: SyntaxError (DOM IDBDatabase Exception 12): Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.
    1616Object store names:
    1717Actually created an object store
    1818Object store names:
    1919TestObjectStore1
    20 Failed to create TestObjectStore a second time: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.
     20Failed to create TestObjectStore a second time: ConstraintError (DOM IDBDatabase Exception): Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.
    2121Object store names:
    2222TestObjectStore1
     
    2424Object store names:
    2525TestObjectStore1
    26 Failed to create object store while there is no version change transaction: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
     26Failed to create object store while there is no version change transaction: InvalidStateError (DOM IDBDatabase Exception 11): Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
    2727Object store names:
    2828TestObjectStore1
    29 Failed to create object store outside of onupgradeneeded: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
     29Failed to create object store outside of onupgradeneeded: InvalidStateError (DOM IDBDatabase Exception 11): Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
    3030Object store names:
    3131TestObjectStore1
  • trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures-private-expected.txt

    r195394 r203309  
    99indexedDB.open(dbname)
    1010Initial upgrade needed: Old version - 0 New version - 1
    11 Failed to create object store with both autoincrement and an empty keypath: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
     11Failed to create object store with both autoincrement and an empty keypath: InvalidAccessError (DOM IDBDatabase Exception 15): Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
    1212Object store names:
    13 Failed to create object store with both autoincrement and a sequence keypath: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
     13Failed to create object store with both autoincrement and a sequence keypath: InvalidAccessError (DOM IDBDatabase Exception 15): Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
    1414Object store names:
    15 Failed to create object store with invalid keyPath: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.
     15Failed to create object store with invalid keyPath: SyntaxError (DOM IDBDatabase Exception 12): Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.
    1616Object store names:
    1717Actually created an object store
    1818Object store names:
    1919TestObjectStore1
    20 Failed to create TestObjectStore a second time: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.
     20Failed to create TestObjectStore a second time: ConstraintError (DOM IDBDatabase Exception): Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.
    2121Object store names:
    2222TestObjectStore1
     
    2424Object store names:
    2525TestObjectStore1
    26 Failed to create object store while there is no version change transaction: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
     26Failed to create object store while there is no version change transaction: InvalidStateError (DOM IDBDatabase Exception 11): Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
    2727Object store names:
    2828TestObjectStore1
    29 Failed to create object store outside of onupgradeneeded: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
     29Failed to create object store outside of onupgradeneeded: InvalidStateError (DOM IDBDatabase Exception 11): Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
    3030Object store names:
    3131TestObjectStore1
  • trunk/LayoutTests/storage/indexeddb/modern/double-abort-expected.txt

    r195380 r203309  
    99indexedDB.open(dbname)
    1010Initial upgrade needed: Old version - 0 New version - 1
    11 Second abort failed: Error: Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.
     11Second abort failed: InvalidStateError (DOM IDBDatabase Exception 11): Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.
    1212Initial upgrade versionchange transaction aborted
    1313PASS successfullyParsed is true
  • trunk/LayoutTests/storage/indexeddb/modern/double-abort-private-expected.txt

    r195394 r203309  
    99indexedDB.open(dbname)
    1010Initial upgrade needed: Old version - 0 New version - 1
    11 Second abort failed: Error: Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.
     11Second abort failed: InvalidStateError (DOM IDBDatabase Exception 11): Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.
    1212Initial upgrade versionchange transaction aborted
    1313PASS successfullyParsed is true
  • trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt

    r195380 r203309  
    1111Initial upgrade versionchange transaction complete
    1212readwrite put success - about to try to delete an objectstore
    13 Failed to deleteObjectStore without a versionchange transaction - Error: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
     13Failed to deleteObjectStore without a versionchange transaction - InvalidStateError (DOM IDBDatabase Exception 11): Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
    1414readwrite transaction complete
    1515Second upgrade needed: Old version - 1 New version - 2
    16 Failed to deleteObjectStore with a non-existent objectstore - Error: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found.
    17 Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - Error: A request was placed against a transaction which is either currently not active, or which is finished.
     16Failed to deleteObjectStore with a non-existent objectstore - NotFoundError (DOM IDBDatabase Exception 8): Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found.
     17Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - TransactionInactiveError (DOM IDBDatabase Exception): A request was placed against a transaction which is either currently not active, or which is finished.
    1818Second version change transaction complete
    1919PASS successfullyParsed is true
  • trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-private-expected.txt

    r195394 r203309  
    1111Initial upgrade versionchange transaction complete
    1212readwrite put success - about to try to delete an objectstore
    13 Failed to deleteObjectStore without a versionchange transaction - Error: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
     13Failed to deleteObjectStore without a versionchange transaction - InvalidStateError (DOM IDBDatabase Exception 11): Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
    1414readwrite transaction complete
    1515Second upgrade needed: Old version - 1 New version - 2
    16 Failed to deleteObjectStore with a non-existent objectstore - Error: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found.
    17 Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - Error: A request was placed against a transaction which is either currently not active, or which is finished.
     16Failed to deleteObjectStore with a non-existent objectstore - NotFoundError (DOM IDBDatabase Exception 8): Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found.
     17Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - TransactionInactiveError (DOM IDBDatabase Exception): A request was placed against a transaction which is either currently not active, or which is finished.
    1818Second version change transaction complete
    1919PASS successfullyParsed is true
  • trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt

    r195380 r203309  
    99indexedDB.open(dbname)
    1010Upgrade needed: Old version - 0 New version - 1
    11 Failed to start a transaction while a versionChange transaction was in progress - Error: Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.
     11Failed to start a transaction while a versionChange transaction was in progress - InvalidStateError (DOM IDBDatabase Exception 11): Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.
    1212versionchange transaction completed
    13 Failed to start a transaction with an empty set of object stores - Error: Failed to execute 'transaction' on 'IDBDatabase': The storeNames parameter was empty.
    14 Failed to start a transaction to a nonexistent object store - Error: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.
     13Failed to start a transaction with an empty set of object stores - InvalidAccessError (DOM IDBDatabase Exception 15): Failed to execute 'transaction' on 'IDBDatabase': The storeNames parameter was empty.
     14Failed to start a transaction to a nonexistent object store - NotFoundError (DOM IDBDatabase Exception 8): Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.
    1515Failed to start a transaction with an invalid mode - TypeError: Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('blahblah') is not one of 'readonly' or 'readwrite'.
    1616Failed to explicitly start a versionchange transaction - TypeError: Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('versionchange') is not one of 'readonly' or 'readwrite'.
    17 Failed to explicitly start a transaction with the close pending flag set - Error: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
     17Failed to explicitly start a transaction with the close pending flag set - InvalidStateError (DOM IDBDatabase Exception 11): Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
    1818PASS successfullyParsed is true
    1919
  • trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures-private-expected.txt

    r195394 r203309  
    99indexedDB.open(dbname)
    1010Upgrade needed: Old version - 0 New version - 1
    11 Failed to start a transaction while a versionChange transaction was in progress - Error: Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.
     11Failed to start a transaction while a versionChange transaction was in progress - InvalidStateError (DOM IDBDatabase Exception 11): Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.
    1212versionchange transaction completed
    13 Failed to start a transaction with an empty set of object stores - Error: Failed to execute 'transaction' on 'IDBDatabase': The storeNames parameter was empty.
    14 Failed to start a transaction to a nonexistent object store - Error: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.
     13Failed to start a transaction with an empty set of object stores - InvalidAccessError (DOM IDBDatabase Exception 15): Failed to execute 'transaction' on 'IDBDatabase': The storeNames parameter was empty.
     14Failed to start a transaction to a nonexistent object store - NotFoundError (DOM IDBDatabase Exception 8): Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.
    1515Failed to start a transaction with an invalid mode - TypeError: Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('blahblah') is not one of 'readonly' or 'readwrite'.
    1616Failed to explicitly start a versionchange transaction - TypeError: Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('versionchange') is not one of 'readonly' or 'readwrite'.
    17 Failed to explicitly start a transaction with the close pending flag set - Error: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
     17Failed to explicitly start a transaction with the close pending flag set - InvalidStateError (DOM IDBDatabase Exception 11): Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
    1818PASS successfullyParsed is true
    1919
  • trunk/Source/WebCore/ChangeLog

    r203303 r203309  
     12016-07-15  Brady Eidson  <beidson@apple.com>
     2
     3        Change toString() behavior for exceptions constructed with "createWithDescriptionAsMessage".
     4        https://bugs.webkit.org/show_bug.cgi?id=159839
     5
     6        Reviewed by Alex Christensen.
     7
     8        No new tests (Covered by changes to existing tests).
     9
     10        This is the first step towards extended exception messages for all exception types.
     11
     12        * dom/ExceptionBase.cpp:
     13        (WebCore::ExceptionBase::ExceptionBase):
     14        (WebCore::ExceptionBase::toString):
     15        * dom/ExceptionBase.h:
     16
    1172016-07-15  Geoffrey Garen  <ggaren@apple.com>
    218
  • trunk/Source/WebCore/dom/ExceptionBase.cpp

    r193428 r203309  
    3838    , m_name(description.name)
    3939    , m_description(description.description)
     40    , m_typeName(description.typeName)
     41    , m_messageSource(messageSource)
    4042{
    4143    if (messageSource == MessageSource::UseDescription) {
     
    5254String ExceptionBase::toString() const
    5355{
    54     return "Error: " + m_message;
     56    if (m_messageSource != MessageSource::UseDescription)
     57        return makeString("Error: ", m_message);
     58
     59    String lastComponent;
     60    if (!m_description.isEmpty())
     61        lastComponent = makeString(": ", m_description);
     62
     63    if (m_name.isEmpty())
     64        return makeString(m_typeName, " Exception", m_code ? makeString(" ", String::number(m_code)) : "", lastComponent);
     65
     66    return makeString(m_name, " (", m_typeName, " Exception", m_code ? makeString(" ", String::number(m_code)) : "", ")", lastComponent);
    5567}
    5668
  • trunk/Source/WebCore/dom/ExceptionBase.h

    r193428 r203309  
    5959    String m_message;
    6060    String m_description;
     61    String m_typeName;
     62    MessageSource m_messageSource;
    6163};
    6264
Note: See TracChangeset for help on using the changeset viewer.