summaryrefslogtreecommitdiff
path: root/nzbget/main.pm
diff options
context:
space:
mode:
Diffstat (limited to 'nzbget/main.pm')
-rw-r--r--nzbget/main.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/nzbget/main.pm b/nzbget/main.pm
index 1ff34c5..5d963f0 100644
--- a/nzbget/main.pm
+++ b/nzbget/main.pm
@@ -3,6 +3,9 @@ package nzbget::main;
use strict;
use warnings FATAL => 'all';
no warnings 'redefine';
+BEGIN {
+ $SIG{__DIE__} = \&handle_errors;
+}
use Apache2::RequestRec ();
use Apache2::RequestIO ();
@@ -20,6 +23,17 @@ use nzbget::remove;
use nzbget::search;
use nzbget::menu;
use nzbget::search_upload;
+use ModPerl::Util;
+
+sub handle_errors {
+# die @_ if $^S;
+
+ my $msg = shift;
+# print "Content-type: text/plain\n\n";
+ print $msg;
+ ModPerl::Util::exit;
+ return;
+}
my %modules =
(