內容

名稱

Test2::Event::Exception - 例外事件

說明

例外事件將顯示在 STDERR 中,並會阻止整體測試檔案通過。

語法

use Test2::API qw/context/;
use Test2::Event::Exception;

my $ctx = context();
my $event = $ctx->send_event('Exception', error => 'Stuff is broken');

方法

繼承自 Test2::Event。同時定義

$reason = $e->error

例外的理由。

注意事項

請注意,所有例外在建構期間都已字串化。

原始碼

Test2 的原始碼存放庫位於 http://github.com/Test-More/test-more/

維護人員

Chad Granum <exodist@cpan.org>

作者

Chad Granum <exodist@cpan.org>

版權

版權所有 2020 Chad Granum <exodist@cpan.org>。

此程式為自由軟體;您可以在與 Perl 相同的條款下重新散布或修改它。

請參閱 http://dev.perl.org/licenses/