Bug 18983 - Exception messages in console not always obvious
Summary: Exception messages in console not always obvious
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-10 00:17 PDT by Oliver Hunt
Modified: 2009-03-02 13:38 PST (History)
2 users (show)

See Also:


Attachments
Proposed Patch (9.22 KB, patch)
2009-03-02 10:50 PST, Timothy Hatcher
aroben: review+
Details | Formatted Diff | Diff
Screenshot of new design (11.57 KB, image/png)
2009-03-02 10:50 PST, Timothy Hatcher
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2008-05-10 00:17:09 PDT
Doing the following example in the console:
q=({valueOf:function(){console.log("argh"); throw "foo";}})
q++

Will result in a small red cross, with the text "foo".  It is not obvious however that the  "foo" text is in fact an exception.
Comment 1 Timothy Hatcher 2008-05-10 08:12:17 PDT
What would make it more obvious?
Comment 2 Adam Roben (:aroben) 2008-05-10 10:31:31 PDT
(In reply to comment #1)
> What would make it more obvious?

Maybe something as simple as prefixing the exception with "Exception: " would help.
Comment 3 Oliver Hunt 2008-07-19 23:28:30 PDT
Yeah, i was thinking something along the lines of what adam referred to.
Comment 4 Timothy Hatcher 2009-03-02 10:06:06 PST
This recently regressed a little, we no longer show a small red cross. And some cases the text isn't red. I have a fix that make these cases clear and consistent. Prefixing isn't a trivial change, so I will save that for another rainy day.
Comment 5 Timothy Hatcher 2009-03-02 10:50:16 PST
Created attachment 28184 [details]
Proposed Patch
Comment 6 Timothy Hatcher 2009-03-02 10:50:35 PST
Created attachment 28185 [details]
Screenshot of new design
Comment 7 Adam Roben (:aroben) 2009-03-02 12:53:38 PST
Comment on attachment 28184 [details]
Proposed Patch

>         (WebInspector.Console.prototype._formaterror): Add an error-message
>         classed span around the message to show in red and remove the
>         console-message-url class from the link so it doesn't float right.
>         Instead inclose the link in parenthesis and use displayNameForURL

Typos: inclose -> enclose, parenthesis -> parentheses

>         (WebInspector.ConsoleMessage.prototype.toMessageElement): Simplify
>         how line numbers are shown since link underlining a string with
>         parenthesis looks bad.

Typo: parenthesis -> parentheses

Can you make a manual test?

r=me
Comment 8 Timothy Hatcher 2009-03-02 13:38:46 PST
Landed in r41364.