[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scriptometer: measuring the ease of SOP (Script Oriented Programming) of programming languages



"Anton van Straaten" <anton@appsolutions.com> writes:

> (A side note is that in most languages with exceptions, they cause the loss
> of control flow information when debugging, or even reporting a crash.  The
> latter can be compensated for by good logging in the exception handlers, but
> this turns what was (and should be!) an automatic operation by the language
> into something that has to be explicitly programmed.)

FYI perl allows this with $SIG{__DIE__}, example:

  $SIG{__DIE__} = sub { my $err = $_[0]; log::l("warning: $err") };

this is quite crude (it's called for every exception), but it helps a
lot!