소스 검색

error handling

George Baugh 2 년 전
부모
커밋
9e49431d7e
3개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      lib/TCMS.pm
  2. 0 0
      www/templates/html/components/footers/about_footer.tx
  3. 0 0
      www/templates/html/components/headers/about_header.tx

+ 1 - 0
lib/TCMS.pm

@@ -236,6 +236,7 @@ sub app {
     {
         no strict 'refs';
         my $output = $routes{$path}{callback}->($query);
+        die "$path returned no data!" unless ref $output eq 'ARRAY' && @$output == 3;
 
         INFO("$env->{REQUEST_METHOD} $output->[0] $path");
 

+ 0 - 0
www/templates/html/components/footers/about_footer.tx


+ 0 - 0
www/templates/html/components/headers/about_header.tx