Explorar el Código

simplify error out

ikkez hace 9 años
padre
commit
1ca06dfc23
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      frameworks/PHP/fat-free/index.php

+ 4 - 0
frameworks/PHP/fat-free/index.php

@@ -3,8 +3,12 @@
 $f3=require('src/base.php');
 
 $f3->set('DEBUG',2);
+$f3->set('HIGHLIGHT',false);
 $f3->set('CACHE','folder=tmp/cache/');
 $f3->set('UI','ui/');
+$f3->set('ONERROR',function($f3){
+    echo $f3->get('ERROR.code').': '.$f3->get('ERROR.text')."\n".$f3->get('ERROR.trace');
+});
 
 $f3->set('DBS',array('mysql:host=localhost;port=3306;dbname=hello_world','benchmarkdbuser','benchmarkdbpass'));
 // http: //www.techempower.com/benchmarks/#section=code