in reply to SOLVED: Testing output of logger output when dying
update: meh, I see you've already tried what I have below...
update2: I can't reproduce what you're seeing (test exits):
use Test::Exception tests => 2; use Test::More; sub blah { die "died!"; } throws_ok { blah() } qr/died!/, 'died ok'; is (1, 1, 'one is one'); __END__ ok 1 - died ok ok 2 - one is one
/updates
Isn't:
$logger->fatal("(Line: $line) " . $error); die "\n";
Simply logging a message, and then die()ing with only a newline character being set to $@, which I presume that throws_ok() will see?
Does:
$logger->fatal("(Line: $line) " . $error); die "(Line: $line) " . $error;
help?
|
|---|