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