From: Metabox Date: Fri, 31 May 2019 03:59:53 +0000 (+1000) Subject: try catch added. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=a6c5d314ec9dba0bb44983f8c7bd7726f53c1a3e;p=LifeLog.git try catch added. --- diff --git a/htdocs/cgi-bin/login_ctr.cgi b/htdocs/cgi-bin/login_ctr.cgi index 27bf2b3..4f87dda 100755 --- a/htdocs/cgi-bin/login_ctr.cgi +++ b/htdocs/cgi-bin/login_ctr.cgi @@ -120,6 +120,7 @@ return 0; } sub checkAutologinSet { +try{ #We don't need to slurp as it is expected setting in header. my @cre; open(my $fh, '<', './main.cnf' ) or die "Can't open main.cnf: $!"; @@ -148,6 +149,13 @@ sub checkAutologinSet { } } } + catch{ + print $cgi->header; + print "SERVER ERROR:".$_; + print $cgi->end_html; + exit; + } +} sub checkCreateTables { try{