Process/Php7.php
[Pman.Core] / Process / Php7.php
index 9bb0e4e..98dba91 100644 (file)
@@ -22,9 +22,14 @@ class Pman_Core_Process_Php7 extends Pman
             die("CLI only");
         }
     }
-
+    
     function get($base, $opts = array()) 
     {
+        set_error_handler(function ($errno, $errstr, $errfile, $errline ){
+//            throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
+            echo "{$errno}\n";
+        });
+        
         $this->scan();
     }
     
@@ -49,7 +54,13 @@ class Pman_Core_Process_Php7 extends Pman
                 continue;
             }
             
-            require_once implode('/', $route) . "/" . $d;
+//            require_once implode('/', $route) . "/" . $d;
+            
+            try {
+                require_once implode('/', $route) . "/" . $d;
+            } catch (ErrorException $ex) {
+                echo "Unable to load configuration file.";
+            }
             
         }