[358] in BarnOwl Developers
[D-O-H] r500 - in trunk: . owl
daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:05:18 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Mon, 8 Jan 2007 21:40:12 -0500 (EST)
Author: nelhage
Date: 2007-01-08 21:40:11 -0500 (Mon, 08 Jan 2007)
New Revision: 500
Modified:
trunk/
trunk/owl/perlconfig.c
Log:
r17881@phanatique: nelhage | 2007-01-08 21:39:16 -0500
Catch errors in perl edit callbacks
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- bb873fd7-8e23-0410-944a-99ec44c633eb:/branches/owl/filter-rewrite:15925
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/trunk:17880
+ bb873fd7-8e23-0410-944a-99ec44c633eb:/branches/owl/filter-rewrite:15925
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/trunk:17881
Modified: trunk/owl/perlconfig.c
===================================================================
--- trunk/owl/perlconfig.c 2007-01-09 02:39:59 UTC (rev 499)
+++ trunk/owl/perlconfig.c 2007-01-09 02:40:11 UTC (rev 500)
@@ -422,6 +422,7 @@
void owl_perlconfig_edit_callback(owl_editwin *e)
{
SV *cb = (SV*)(e->cbdata);
+ unsigned int n_a;
if(cb == NULL) {
owl_function_error("Perl callback is NULL!");
}
@@ -435,8 +436,12 @@
XPUSHs(sv_2mortal(newSVpv(owl_editwin_get_text(e), 0)));
PUTBACK;
- call_sv(cb, G_DISCARD);
+ call_sv(cb, G_DISCARD|G_KEEPERR|G_EVAL);
+ if(SvTRUE(ERRSV)) {
+ owl_function_error("%s", SvPV(ERRSV, n_a));
+ }
+
FREETMPS;
LEAVE;