Open Bug 329026 Opened 18 years ago Updated 2 years ago

Improve error reporting in CanvasRenderingContext2D.cpp

Categories

(Core :: Graphics: Canvas2D, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: roc, Unassigned)

References

(Blocks 1 open bug)

Details

Developing Web apps is a sucky experience because when things don't work, you rarely get meaningful feedback. If you're lucky, you get a message in the JS console with the function that failed, the source line, and an nsresult to explain why (usually the ever-helpful "NS_ERROR_FAILURE"). It shouldn't be terribly hard to fix this; the code that detects and returns NS_ERROR_FAILURE can and should export a meaningingful error message. This would improve our own lives and the lives of Web developers everywhere.

See http://wiki.mozilla.org/Gecko:ErrorMessages for more discussion.
I think this is a project where contributors without elite C++ coding skillz could make a huge difference.
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060320 Firefox/1.6a1

Ages ago, there was a document either in a printed book such as the Frilled
Lizard, or on the web on the XUL Planet site which stated with emphasis how 
a browser such as MAS could be created with javascript and XUL (no C++ at all).
I remember very clearly a tutorial that showed how to add a either a menu
or a menuitem (I forget which) to an existing product, starting very simply
(but in a practical, hands-on way) with finished with making a DTD, entities
and doing localisation.

Either I am hallucinating, or this has either disappeared or become obsolete
and not been replaced.

However, I think that a tutorial/worked example along those lines would be
a very useful way in for anyone who wants to contribute to Mozilla by modifying
its skeleton (XUL), its musculature (javascript) without having to study
its biochemistry (C++). Unfortunately, the people who are capable of
writing such a document are by definition unable to see the need for it.

It is not really a question of the eliteness or otherwise of the C++ skills.
I would guess that even elite C++ coders only deeply understand about half
the language (C++ is huge), and average ones perhaps understand how not to 
get outside the tenth or quarter of the language that they do understand.

I would guess that the key is to apply the standard Open Source method, and
arrange the confluence of three things:

    a person who has the problem (and is interested in it)
    a person who can diagnose the problem
    a person who can fix the problem

It would be good if the fine folk who are active in Bugzilla could somehow
increase the number of people in the third category - some of them will 
also turn out to be members of the first two.

This is how the the community of extension writers started and then grew.

Is it really the claim of the wiki page referred to that none of the people
who are discomforted by the "Lack of DOM error messages" can work out what
is missing and exaplain it so that development can take place?

(In which case it behoves the DOM community to somehow enlarge itself
so it acquires members who also have the other skills).

In short: Is there any way in which getting started with the trunk of
Mozilla can be made as easy as writing an extension is? Is there any way
in which projects suitable for starters can be identified? Are there
any resouces (patchmaker?) that can be promoted? Can the operations
envisaged here by split up into manageable parts so that people feel
encouraged to work on them?  
Ben, your comment doesn't seem particularly related to this bug (which is a technical issue), and more importantly, most people involved with documentation will not see your comments. I suggest that you post to the MDC mailing list:
 http://developer.mozilla.org/en/docs/MDC:Community

(Note that there is an ongoing discussion about making it easier for contributors to get started.)
Blocks: 435025
This report needs a small test case.
Whiteboard: needTestcase
Keywords: testcase-wanted
Whiteboard: needTestcase
Assignee: general → nobody
QA Contact: ian → general
Whiteboard: [good first bug]
Having looked over the bug, I don't believe this is good g-f-b fodder in its current state. At minimum, this bug would need a mentor who would be on the hook to provide a spec from which to start and pointers towards some relevant places that could benefit from these new error messages. Not every location has to be identified up front, but a sampling from which a contributor could jump off from would go a long way to making this bug actionable.
Whiteboard: [good first bug]
Comment 6 is now https://searchfox.org/mozilla-central/search?q=329026.
Component: DOM → Canvas: 2D
Summary: Lack of DOM error message sucks → Improve error reporting in CanvasRenderingContext2D.cpp
Severity: normal → enhancement
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.