|Anonymous | Login | Signup for a new account||2019-04-19 09:14 PDT|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000670||Core Inform||Kinds and type checking||public||2011-06-01 07:37||2014-05-07 07:33|
|Target Version||Fixed in Version||6L02|
|Summary||0000670: testing a relation with the wrong kinds gives an unhelpful error message|
|Description||If you set up a relation that specifies a specific kind, and then later the game attempts to test that relation using something that is not of the proper kind, Inform spits out a singularly unhelpful runtime error message:|
[** Programming error: tried to read (something) **]
If the game tries to establish or remove the relation, the runtime error is slightly more forthcoming:
[** Programming error: (object number 275069) has no property p56_blorbing to write **]
...but still, I would argue, essentially opaque to an inexperienced programmer. No explanatory message pops up in the opposite IDE window, as happens with most other runtime errors.
|Minimal Source Text To Reproduce|
Testing is a room. An umbrella is here. A pear is here. Blorbing relates various devices to one thing. The verb to be blorbed into implies the blorbing relation. Instead of inserting something into something: [first statement] if the noun is blorbed into the second noun, say "Blorbed!"; [second statement] otherwise now the noun is blorbed into the second noun. Test me with "put umbrella in pear".
|Additional Information||Note, first of all, that the error only happens if you relate *various* devices to one thing. If you change the relation to "one device to one thing", the error messages are not triggered. In particular, this means that the second statement goes ahead and establishes the blorbing relation with the pear, even though it should not be able to.|
I'm clear on why the second statement ("now the noun is blorbed into the second noun") causes an error (and it should definitely cause an error, whether the relation is varios-to-one or one-to-one); I just think it needs a better-worded error message, and ideally a help screen like what other runtime errors get.
However, for the first statement ("if the noun is blorbed into the second noun"), it would be nice if the condition just quietly resolved to false. We know that an umbrella can never be blorbed into a pear, because an umbrella is not a device. Thus the answer to the question, "Is the umbrella blorbed into the pear?" should not be "ERROR," but rather, "No." Since the game does, in fact, correctly treat the condition as false, it's not clear to me why the error message is necessary at all. In any case, if it is necessary, then it also should be worded more clearly.
|Tags||No tags attached.|
|Effect||(cosmetic) Error message is badly worded|
|This is now checked at run-time; I think the small loss of performance is worth it. It is now safe to read the relation for any kind of object, but the result is "false" if either kind is wrong. It causes a run-time problem to try to set or unset the relation for the wrong kinds.|
|2011-06-01 07:37||mikegentry||New Issue|
|2011-06-01 20:47||jmcgrew||Status||new => acknowledged|
|2011-06-03 15:15||EmacsUser||Status||acknowledged => confirmed|
|2014-02-02 06:07||graham||Note Added: 0002441|
|2014-02-02 06:07||graham||Status||confirmed => resolved|
|2014-02-02 06:07||graham||Resolution||open => fixed|
|2014-02-02 06:07||graham||Assigned To||=> graham|
|2014-05-07 07:32||jmcgrew||Fixed in Version||=> 6L02|
|2014-05-07 07:33||jmcgrew||Status||resolved => closed|
|Copyright © 2000 - 2010 MantisBT Group|