line |
true |
false |
branch |
17
|
87 |
0 |
char* class_name = abi::__cxa_demangle(ti.name(), NULL, NULL, &status); |
18
|
87 |
0 |
std::string ret = "["; |
19
|
87 |
0 |
if (status == 0) { |
20
|
87 |
0 |
ret += class_name; |
23
|
0 |
0 |
else ret = ""; |
24
|
87 |
0 |
ret += "]"; |
31
|
8 |
0 |
catch (Sv& err) { return err; } |
32
|
110 |
0 |
catch (const char* err) { return Simple(string_view(err)); } |
|
0 |
0 |
catch (const char* err) { return Simple(string_view(err)); } |
34
|
24 |
0 |
catch (const panda::string& err) { return Simple(err); } |
|
0 |
0 |
catch (const panda::string& err) { return Simple(err); } |
38
|
87 |
0 |
auto tn = get_type_name(typeid(err)); |
39
|
87 |
0 |
SV* errsv = newSVpv(tn.data(), 0); |
40
|
87 |
0 |
sv_catpv(errsv, " "); |
41
|
87 |
0 |
sv_catpv(errsv, err.what()); |
45
|
0 |
0 |
dTHX; |
|
0 |
0 |
dTHX; |
|
0 |
0 |
dTHX; |
|
0 |
0 |
dTHX; |
|
0 |
0 |
dTHX; |
53
|
0 |
0 |
dTHX; |
|
0 |
0 |
dTHX; |
|
0 |
0 |
dTHX; |
63
|
229 |
0 |
if (i < 0) return _exc2sv_default(context); // no 1 has catched the exception, apply defaults |
64
|
0 |
0 |
if (i >= (int)catch_handlers.size()) i = catch_handlers.size() - 1; |
66
|
0 |
0 |
auto ret = catch_handlers[i](context); |
67
|
0 |
0 |
if (ret) return ret; |
|
0 |
0 |
if (ret) return ret; |
75
|
0 |
229 |
for (auto& processor: exception_processors) { |
76
|
0 |
0 |
ex_sv = processor(ex_sv, context); |
86
|
0 |
0 |
catch_handlers.push_back([h](const Sub&) -> Sv { return h(); }); |
|
0 |
0 |
catch_handlers.push_back([h](const Sub&) -> Sv { return h(); }); |
94
|
0 |
0 |
exception_processors.push_back([f](Sv& ex, const Sub&) -> Sv { return f(ex); }); |
|
0 |
0 |
exception_processors.push_back([f](Sv& ex, const Sub&) -> Sv { return f(ex); }); |
98
|
36 |
0 |
} |
|
36 |
0 |
} |