in reply to Catching a die in Perl XS
SV* rv = eval_pv("require Module; import Module; 1", 0); if (!SvTRUE(rv)) { ... handle exception ... } [download]
$@ is available as ERRSV.