On Mon, 2005-11-14 at 12:31 +0000, Jonathan Worthington wrote: 
> My current thinking on this is that a HLL will define a sub that knows how 
> to print errors for that HLL...

The HLL could register a PMC or object class (instead of just a sub),
using the existing "Parrot_register_HLL_type" call (or a future
equivalent opcode).

Then, the system can use the existing "Parrot_get_ctx_HLL_type" call (or
a future equivalent opcode) to work out which error handler to call for
that HLL.

> But there is also an issue relating to what if some of the
> BT is from another HLL's code

One handler could use the "Parrot_get_ctx_HLL_type" call to find the
handler for nested code that's written using a different HLL.

For example, Amber allows methods of an Amber class to be written in
PIR. If that PIR fails, the PIR error handler should print the message
for its piece of code before finding and handing over to the Amber error
handler for the remainder.

Regards,
Roger Browne


Reply via email to