in reply to Re: Howto enrich errormessages
in thread How to enrich error-messages?

Thanks Ike!

$SIG{__WARN__} was the jigsaw piece I was looking for, though your code doesn't work and I'm not sure if you really meant a void if clause.

Anyway I think the best approach is to extend or subclass diagnostics in a wayto support a "Terse" option. That must be stable.

Thx! 8)

Cheers Rolf

Replies are listed 'Best First'.
Re^3: Howto enrich errormessages
by ikegami (Patriarch) on Oct 15, 2009 at 00:12 UTC
      > Fixed.

      not yet. Fatals are not reported... :)

      > By the way, diagnostics uses $SIG{__WARN__} too

      I know, but it has some functionality. I'd like to add a reference to the according diagnostic, which can be displayed in emacs after clicking.

      Cheers Rolf

        not yet. Fatals are not reported... :)

        Yes they are, it was just buggy. (Fixed.) I said "something like" the code that follows. I figured you were smart enough to get it to work. Note that it doesn't mark other lines as "info", it doesn't properly tag multi-line warnings and errors, and it doesn't handle programs that don't return a true value.