Author: timbo
Date: Tue Sep 19 01:51:41 2006
New Revision: 7846
Modified:
dbi/trunk/DBI.xs
Log:
Experimental addition of caller into to RaiseError/PrintError message. Disabled
for now.
Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs (original)
+++ dbi/trunk/DBI.xs Tue Sep 19 01:51:41 2006
@@ -2140,7 +2140,7 @@
}
static void
-dbi_caller_string(SV *buf, COP *cop, char *prefix, char *suffix, int
show_line, int show_caller, int show_path)
+dbi_caller_string(SV *buf, COP *cop, char *prefix, int show_line, int
show_path)
{
dTHX;
STRLEN len;
@@ -2170,10 +2170,10 @@
sv_setpv(buf,"");
if (CopLINE(curcop)) {
COP *cop;
- dbi_caller_string(buf, curcop, prefix, suffix, show_line, show_caller,
show_path);
+ dbi_caller_string(buf, curcop, prefix, show_line, show_path);
if (show_caller && (cop = dbi_caller_cop())) {
SV *via = sv_2mortal(newSVpv("",0));
- dbi_caller_string(via, cop, prefix, suffix, show_line,
show_caller, show_path);
+ dbi_caller_string(via, cop, prefix, show_line, show_path);
sv_catpvf(buf, " via %s", SvPV_nolen(via));
}
}
@@ -3256,6 +3256,13 @@
}
}
+ if (0) {
+ COP *cop = dbi_caller_cop();
+ if (cop && (CopLINE(cop) != CopLINE(curcop) || CopFILEGV(cop) !=
CopFILEGV(curcop))) {
+ dbi_caller_string(msg, cop, " called via ", 1, 0);
+ }
+ }
+
if ( SvTRUE(err_sv)
&& DBIc_has(imp_xxh, DBIcf_HandleError)
&& (hook_svp = hv_fetch((HV*)SvRV(h),"HandleError",11,0))