MOO-cows Mailing List Archive


Re: [SERVER] huh stack in tracebacks

ThwartedEfforts writes:
> Because of the (dubious?) decision to make the huh verb called with the

Definitely dubious.

> value of 'verb' set to the first word on the entered line, I'm having
> trouble getting the full verb name (or any valid verb name) from a traceback
> list as returned by the except[ion] clause.  Any way around this short of
> hand parsing the printed traceback strings?

There isn't any other way to discover that the verb on the bottom of the stack
is really `huh' and not whatever the first word on the command-line was.

> I think this problem also stems from the fact that the value of the 'verb'
> field in tracebacks is the value of the 'verb' variable the code.  Could this
> be changed to a verb index (since can reference verbs by number now) or the
> full verb name as it appears on the object?

It wouldn't be trivial to use numbers here; that information isn't kept around
after the verb is called.  It would be easy to switch over to the full set of
verb names instead of whatever the caller used, but that would be an
incompatible change to the callers() function (and no, I don't want to make the
two kinds of stack lists different).



Home | Subject Index | Thread Index