Peter Scott wrote, in RFC 80 (v2):
>
> =item id
> 
> Unique numeric identifier, assigned by perl developers.

I'm loath to bother everyone with this, but to me the id of an
object should be unique to each *instance* of the class.  If we had

    my $e = Exception->New(id => "ABC.1234");
    my $f = Exception->New(id => "ABC.1234");

then $e and $f would have the same id, but be different objects.
In RFC 96 I've proposed called this attribute the "tag", in the
sense of those little paper labels tied to merchandise with a
string or the little embossed metal plate attached to a motor or
to a pressure relief valve (that's what mechanical engineers call
them).

If we really want an id attribute, I think it should be "$self"
or ++$foo for some base-module lexically scoped $foo.  I can't
think of any practial use for it right now, but that certainly
doesn't mean there can't be any.

> Line number exception was thrown at.
> File exception was thrown in.

Should this be line thrown at or line constructed at?  Does anyone
care?

> =item data[(userdata)]
> 
> User data, arbitrarily complex.  If the user knew the underlying
> object implementation, of course they could stick in attributes
> with any names they wanted; but nothing should rely on that, so
> this hook is provided.

Something like this is probably a good idea, but as noted in RFC 96,
"How to extend ivars and control namespace?".

> Stringifying the object itself will yield the C<message> attribute.

Or perhaps a formatted combination of a subset of the attributes,
as in RFC 96?

> A C<facility> attribute was suggested to indicate what part of
> perl is throwing the exception: IMO that is covered in the
> exception class.

Agreed.

Yours, &c, Tony Olekshy

Reply via email to