« blib/lib/ExtUtils/XSpp/Exception/unknown.pm
↑ Summary
blib/lib/ExtUtils/XSpp/Exception/stdmessage.pm »
| 1 | package ExtUtils::XSpp::Exception::simple; | ||||||||||
| 2 | 21 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 21 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 21 | ▶ | use base 'ExtUtils::XSpp::Exception'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 2 | ▶ | sub init { | ||||||||
|
Subroutine
init: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 8 | 2 | my $this = shift; | |||||||||
| 9 | 2 | $this->SUPER::init(@_); | |||||||||
| 10 | } | ||||||||||
| 11 | |||||||||||
| 12 | 4 | ▶ | sub handler_code { | ||||||||
|
Subroutine
handler_code: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 13 | 4 | my $this = shift; | |||||||||
| 14 | 4 | my $no_spaces_indent = shift; | |||||||||
| 15 | 4 | ▶ | $no_spaces_indent = 4 if not defined $no_spaces_indent; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | |||||||||||
| 17 | 4 | my $ctype = $this->cpp_type; | |||||||||
| 18 | 4 | my $msg = "Caught C++ exception of type '$ctype'"; | |||||||||
| 19 | 4 | my $code = <<HERE; | |||||||||
| 20 | catch ($ctype& e) { | ||||||||||
| 21 | croak("$msg"); | ||||||||||
| 22 | } | ||||||||||
| 23 | HERE | ||||||||||
| 24 | 4 | return $this->indent_code($code, $no_spaces_indent); | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 21 | 1; | |||||||||