summaryrefslogtreecommitdiffstats
path: root/email_in.pl
diff options
context:
space:
mode:
Diffstat (limited to 'email_in.pl')
-rw-r--r--email_in.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/email_in.pl b/email_in.pl
index 40474afaf..4bcf4438e 100644
--- a/email_in.pl
+++ b/email_in.pl
@@ -340,6 +340,10 @@ sub die_handler {
# the user-error or code-error template ended. So we don't really die.
return if $msg->isa('Template::Exception') && $msg->type eq 'return';
+ # If this is inside an eval, then we should just act like...we're
+ # in an eval (instead of printing the error and exiting).
+ die(@_) if $^S;
+
# We can't depend on the MTA to send an error message, so we have
# to generate one properly.
if ($input_email) {