$soapServer = $soapServer; } /** * @param Exception $exception * @param bool $debug */ public function output($exception, $debug){ header('HTTP/1.0 500 Internal Server Error', true, 500); header('Status: 500 Internal Server Error', true, 500); if($debug){ $this->soapServer->fault($exception->getCode(), $exception->getMessage(), null, $exception->getTraceAsString()); } else { $this->soapServer->fault(0, self::$productionMessage); } } }