Example #1
0
 /**
  * Prints the message of the Exception if it's not null.
  */
 function printMessage(Exception $t)
 {
     print $t->getMessage() . "\n";
     if (self::getMsgOutputLevel() === PROJECT_MSG_DEBUG) {
         print $t->getTraceAsString() . "\n";
         if ($t instanceof Exception) {
             $c = $t->getCause();
             if ($c !== null) {
                 print "Wrapped exception trace:\n";
                 print $c->getTraceAsString() . "\n";
             }
         }
     }
     // if output level is DEBUG
 }