I'm having trouble with ExceptionError's not giving useful stacktraces:
the trace only shows Test::Unit package calls with
Test::Unit::TestCase::run_bare being as close as you get to the actual
testcase.  Using $SIG{'__DIE__'} with code adapted from
Test::Unit::TestCase::run_bare() gives a better stacktrace.  run_bare
also needs to be changed to check that the exception may be of the more
generic "Test::Unit::Exception" rather than
"Test::Unit::ExceptionFailure".

-Kevin

ps: I apologize for the non-patch format, I'm not working with cvs.


$SIG{'__DIE__'} = \&die_handler;

use Test::Unit::ExceptionError; 
sub die_handler
{
        my ($exception) = @_;

        if (!ref($exception) ||
            ! eval {$exception->isa("Test::Unit::Exception")} ) 
        {
            $exception = Test::Unit::ExceptionError->new($exception);
        }
        die $exception;
}

_______________________________________________
Perlunit-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/perlunit-devel

Reply via email to