summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@wirdorange.org>2012-05-14 20:30:37 (GMT)
committerOthmar Gsenger <otti@wirdorange.org>2012-05-14 20:30:37 (GMT)
commitc690575ab4ed0f6784da9e01fdcab20a49256f7c (patch)
treeb071dc599d60a340e5a607460da55e6c34194f38
parentdbb74ceda992bd4d630982de3610c64b84beee47 (diff)
added error messages
-rwxr-xr-xenv.pl1
-rw-r--r--nzbget/cancel.pm1
-rw-r--r--nzbget/download.pm1
-rw-r--r--nzbget/enqueue.pm1
-rw-r--r--nzbget/list.pm1
-rw-r--r--nzbget/log.pm1
-rw-r--r--nzbget/main.pm14
-rw-r--r--nzbget/menu.pm1
-rw-r--r--nzbget/pre_enqueue.pm1
-rw-r--r--nzbget/read.pm1
-rw-r--r--nzbget/remove.pm1
-rw-r--r--nzbget/search.pm1
-rw-r--r--nzbget/search_upload.pm1
13 files changed, 14 insertions, 12 deletions
diff --git a/env.pl b/env.pl
index 06db507..694abb7 100755
--- a/env.pl
+++ b/env.pl
@@ -1,7 +1,6 @@
#!/usr/bin/perl
use strict;
use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
print header;
print start_html('env');
diff --git a/nzbget/cancel.pm b/nzbget/cancel.pm
index 556cc22..ed08fc5 100644
--- a/nzbget/cancel.pm
+++ b/nzbget/cancel.pm
@@ -3,7 +3,6 @@ package nzbget::cancel;
use strict;
use Apache2::Const -compile => qw(OK REDIRECT);
use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
use local::nzbget;
use local::db;
use local::user;
diff --git a/nzbget/download.pm b/nzbget/download.pm
index 39394e7..4609aee 100644
--- a/nzbget/download.pm
+++ b/nzbget/download.pm
@@ -2,7 +2,6 @@ package nzbget::download;
use strict;
use Apache2::Const -compile => qw(OK REDIRECT);
use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
use local::nzbget;
use local::db;
use local::user;
diff --git a/nzbget/enqueue.pm b/nzbget/enqueue.pm
index e786f38..f0c8127 100644
--- a/nzbget/enqueue.pm
+++ b/nzbget/enqueue.pm
@@ -2,7 +2,6 @@ package nzbget::enqueue;
use strict;
use Apache2::Const -compile => qw(OK REDIRECT);
use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
use local::db;
use local::nzbget;
use utf8;
diff --git a/nzbget/list.pm b/nzbget/list.pm
index 65d348d..e4f0565 100644
--- a/nzbget/list.pm
+++ b/nzbget/list.pm
@@ -3,7 +3,6 @@ package nzbget::list;
use strict;
use Apache2::Const -compile => qw(OK REDIRECT);
use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
use utf8;
use local::nzbget;
use local::db;
diff --git a/nzbget/log.pm b/nzbget/log.pm
index 05670ec..069fdb0 100644
--- a/nzbget/log.pm
+++ b/nzbget/log.pm
@@ -3,7 +3,6 @@ use strict;
use Apache2::Const -compile => qw(OK);
use local::nzbget;
use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
use URI::Escape;
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 =
(
diff --git a/nzbget/menu.pm b/nzbget/menu.pm
index e368d21..df082d9 100644
--- a/nzbget/menu.pm
+++ b/nzbget/menu.pm
@@ -2,7 +2,6 @@ package nzbget::menu;
use strict;
use Apache2::Const -compile => qw(OK REDIRECT);
use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
use local::menu;
sub handler {
diff --git a/nzbget/pre_enqueue.pm b/nzbget/pre_enqueue.pm
index dda8967..8d2d708 100644
--- a/nzbget/pre_enqueue.pm
+++ b/nzbget/pre_enqueue.pm
@@ -2,7 +2,6 @@ package nzbget::pre_enqueue;
use strict;
use Apache2::Const -compile => qw(OK);
use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
use local::db;
use local::menu;
diff --git a/nzbget/read.pm b/nzbget/read.pm
index 3cc30ec..8cbc461 100644
--- a/nzbget/read.pm
+++ b/nzbget/read.pm
@@ -2,7 +2,6 @@ package nzbget::read;
use strict;
use Apache2::Const -compile => qw(OK REDIRECT);
use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
use utf8;
use local::db;
use local::user;
diff --git a/nzbget/remove.pm b/nzbget/remove.pm
index 4291a2b..a25c476 100644
--- a/nzbget/remove.pm
+++ b/nzbget/remove.pm
@@ -2,7 +2,6 @@ package nzbget::remove;
use strict;
use Apache2::Const -compile => qw(OK REDIRECT);
use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
use local::db;
use local::user;
use File::Path;
diff --git a/nzbget/search.pm b/nzbget/search.pm
index e1c181d..5314984 100644
--- a/nzbget/search.pm
+++ b/nzbget/search.pm
@@ -2,7 +2,6 @@ package nzbget::search;
use strict;
use Apache2::Const -compile => qw(OK);
use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
use URI::Escape;
use local::params;
use local::nzbindex;
diff --git a/nzbget/search_upload.pm b/nzbget/search_upload.pm
index de3e10f..a4a6d7a 100644
--- a/nzbget/search_upload.pm
+++ b/nzbget/search_upload.pm
@@ -2,7 +2,6 @@ package nzbget::search_upload;
use strict;
use Apache2::Const -compile => qw(OK);
use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
use local::db;
use local::menu;