public static function echoException($eid, $e, $file = '', $line = -1) { $id = LINB::SYM_ID; $msg = LINB::SYM_MESSAGE; if ($e instanceof Exception) { $file = $e->getFile(); $line = $e->getLine(); $e = $e->getMessage(); } if (LINB::$debug) { $e = $e . " at " . $file . "(" . $line . ")"; } $d = array($id => $eid, $msg => $e); echo LINB::formatResponse($d, false); //only the first error will return to browser exit; }