Closed
Bug 604674
Opened 15 years ago
Closed 6 years ago
Improve exception's message when property has only a getter
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
INACTIVE
People
(Reporter: mguillemot, Unassigned)
Details
Attachments
(1 file)
4.65 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10
Build Identifier:
When a script tries to set a property that has only a getter exception with following message is thrown: "Cannot set property {0} that has only a getter."
This is not really helpful as it doesn't indicate on which object it happens.
Reproducible: Always
Comment 2•15 years ago
|
||
What's the reason for including the value in the error message? Doing that is always dangerous, as value's string representation may turn out to be very long (e.g. for a function object) and blow up the message.
I know that it may be dangerous, not really because it may be very long but rather because it may throw an exception as well, hiding the root problem.
Concerning the lengh, I can imagine that we could take only the first n characters, n needed to be determined.
Concerning the reason: it makes the message more helpful. In my concrete case the value would give a precious information on the what I have to implement.
Comment 4•6 years ago
|
||
Closing. Bug management is now done here:
https://github.com/mozilla/rhino
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•