]> lifelog.hopto.org Git - LifeLog.git/commitdiff
try catch added.
authorMetabox <redacted>
Fri, 31 May 2019 03:59:53 +0000 (13:59 +1000)
committerMetabox <redacted>
Fri, 31 May 2019 03:59:53 +0000 (13:59 +1000)
htdocs/cgi-bin/login_ctr.cgi

index 27bf2b3e9d577d218b0df35076634800b2a83329..4f87ddafa00ee274a811e77cb8299a33bb87639a 100755 (executable)
@@ -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 "<font color=red><b>SERVER ERROR</b></font>:".$_;
+    print $cgi->end_html;
+               exit;
+ }
+}
 
 sub checkCreateTables {
 try{