Example #1
0
 public static function SetupErrorHandling($pString = null)
 {
     if (empty(self::$globalTracker)) {
         $obj = new self();
         self::$globalTracker = $obj;
         $obj->stackPtrMostspecific = $obj;
         //$obj->on = true;
         if (!empty($pString)) {
             $obj->quickContextFilters($pString);
         }
         //$what = array();
         if (($n = func_num_args()) > 1) {
             // process channels
             for ($i = 1; $i < $n; $i++) {
                 $channel = func_get_arg($i);
                 if (!is_array($channel)) {
                     $obj->addChannel($channel);
                     //$what[] = $i;
                 } else {
                     foreach ($channel as $name => $channel2) {
                         $obj->addChannel($channel2, $name);
                         //$what[] = $name;
                     }
                 }
             }
         }
         self::CaptureAll();
         //print "<!-- $n ".implode(", ", $what)."\n";
         //print_r($obj);
         //print "\n-->\n";
     }
     return self::$globalTracker;
 }