Pman.php
authorAlan Knowles <alan@roojs.com>
Tue, 9 Oct 2018 07:30:49 +0000 (15:30 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 9 Oct 2018 07:30:49 +0000 (15:30 +0800)
Pman.php

index 128bd78..77683de 100644 (file)
--- a/Pman.php
+++ b/Pman.php
@@ -462,6 +462,11 @@ class Pman extends HTML_FlexyFramework_Page
             $this->transObj->query('ROLLBACK');
         }
         
+        $cli = HTML_FlexyFramework::get()->cli;
+        if ($cli) {
+            echo "ERROR: " .$str . "\n"; // print the error first, as DB might fail..
+        }
+        
         if ($type !== false) {
             
             if(!empty($errors)){
@@ -474,7 +479,6 @@ class Pman extends HTML_FlexyFramework_Page
          
         $cli = HTML_FlexyFramework::get()->cli;
         if ($cli) {
-            echo "ERROR: " .$str . "\n";
             exit(1); // cli --- exit code to stop shell execution if necessary.
         }