After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695718 - jsapi-util: Cut down on error reporting
jsapi-util: Cut down on error reporting
Status: RESOLVED DUPLICATE of bug 690984
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-12 17:05 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-05-07 15:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
jsapi-util: Cut down on error reporting (2.43 KB, patch)
2013-03-12 17:05 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
jsapi-util: Don't emit the fileName/lineNumber (973 bytes, patch)
2013-03-12 17:42 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
jsapi-util: Remove the "Exception was:" prefix (859 bytes, patch)
2013-03-12 17:42 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-03-12 17:05:34 UTC
This is a massive improvement to how we present JS errors, I think.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-03-12 17:05:36 UTC
Created attachment 238715 [details] [review]
jsapi-util: Cut down on error reporting

The message, filename and line number are already reported as
part of the debug message and stack, so don't bother emitting
then. Instead, just show the error message and stack.

At the same time, remove the "Exception was: " prefix.
Comment 2 Giovanni Campagna 2013-03-12 17:11:40 UTC
Review of attachment 238715 [details] [review]:

This patch loses the exception message from logError().
Also, the indentation is still awkward in log messages, as the first line of stack is displayed differently.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-03-12 17:16:17 UTC
(In reply to comment #2)
> Review of attachment 238715 [details] [review]:
> 
> This patch loses the exception message from logError().

Hm. I'm not sure what correct logging output would look like. Should we just do user message, exception message, stack?

(In reply to comment #2)
> Also, the indentation is still awkward in log messages, as the first line of
> stack is displayed differently.

Yeah, I'm not sure how we want to solve that, though.

At the very least, we can take out fileName and lineNumber without losing much.
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-03-12 17:42:23 UTC
Created attachment 238724 [details] [review]
jsapi-util: Don't emit the fileName/lineNumber

It's part of the stack, so it's not really useful.
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-03-12 17:42:26 UTC
Created attachment 238725 [details] [review]
jsapi-util: Remove the "Exception was:" prefix

It's just noise, and doesn't really add anything.
Comment 6 Giovanni Campagna 2013-03-26 15:46:29 UTC
Review of attachment 238724 [details] [review]:

Ops, this slipped out of sight. They both look fine, although it's you choice if you target 1.30.1 or 1.31.1
Comment 7 Giovanni Campagna 2013-03-26 15:46:42 UTC
Review of attachment 238725 [details] [review]:

Yes.
Comment 8 Giovanni Campagna 2013-05-07 10:53:51 UTC
Hey, are you going to merge these ones?
I started to work on 690984 again, which kind of supersedes this.
Comment 9 Jasper St. Pierre (not reading bugmail) 2013-05-07 15:39:41 UTC
Hm. Seems I didn't notice they got ACN'd at some point. Just merge your patches.
Comment 10 Jasper St. Pierre (not reading bugmail) 2013-05-07 15:39:53 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 690984 ***