Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Fifo / ProcessBase.php
1 <?php
2
3 /**
4  * fill in any fifo basic entries that have not been processed..
5  * -- does not fill in values.. - just qty's
6  *
7  */
8 require_once 'Pman.php';
9  
10 class Pman_Xtuple_Fifo_ProcessBase extends Pman
11 {
12     static $permitError = false;
13     static $errMsg = '';
14     
15     function getAuth()
16     {
17         $ff = HTML_FlexyFramework::get();
18         if (!$ff->cli) {
19             die("run form cli only");
20         }
21          
22     }
23     
24     function get()
25     {
26     
27         
28                 die("base class");
29
30          
31    
32     }
33      
34     function onPearError($err)
35     {
36         // in order to get all the error msg, need to disable the prevent looping...
37 //        static $reported = false;
38 //        if ($reported) {
39 //            return;
40 //        }
41         
42         if (self::$permitError) {
43              
44             return;
45             
46         }
47         
48         // prevent looping
49 //        $reported = true;
50         $out = $err->toString();
51         
52         
53         //print_R($bt); exit;
54         $ret = array();
55         $n = 0;
56         foreach($err->backtrace as $b) {
57             $ret[] = @$b['file'] . '(' . @$b['line'] . ')@' .   @$b['class'] . '::' . @$b['function'];
58             if ($n > 20) {
59                 break;
60             }
61             $n++;
62         }
63         //convert the huge backtrace into something that is readable..
64         $out .= "\n" . implode("\n",  $ret);
65      
66         $this->errMsg .= $out; 
67         
68         echo $out ."\n";
69         
70     }
71 }