<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Change how exceptions are logged in the JS console to not look redundant and silly"
   href="https://bugs.webkit.org/show_bug.cgi?id=159855">159855</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Change how exceptions are logged in the JS console to not look redundant and silly
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebCore Misc.
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>beidson&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Change how exceptions are logged in the JS console to not look redundant and silly.

This is needed with work on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - DOM Exception stringification should be more detailed &amp; always prefer custom messages"
   href="show_bug.cgi?id=159822">https://bugs.webkit.org/show_bug.cgi?id=159822</a>, which is making exception messages more rich.

An example of how this work effects console.log can be found here - <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Update SVGException to use the description in toString()"
   href="show_bug.cgi?id=159847#c2">https://bugs.webkit.org/show_bug.cgi?id=159847#c2</a>

CONSOLE MESSAGE: line 14: An invalid value was passed to an operation or assigned to an attribute.: An invalid value was passed to an operation or assigned to an attribute.

The code responsible is in JSDOMBinding.cpp:

void reportException(ExecState* exec, Exception* exception, CachedScript* cachedScript, ExceptionDetails* exceptionDetails)
...
        errorMessage = exceptionBase-&gt;message() + &quot;: &quot;  + exceptionBase-&gt;description();

For Exceptions that have adopted the &quot;description as message&quot; mode, the message and the description are the same.

This can all get cleaned up once the task represented by 159822 is complete, but for now we should do something a little different for the new exceptions vs the old ones.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>