Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * require php 5.2+
- * @package ExceptionHandler
- */
- class exceptionHandlerOutputSoap extends exceptionHandlerOutput{
- /**
- * @var SoapServer
- */
- protected $soapServer;
- /**
- * @param SoapServer $soapServer
- */
- public function __construct($soapServer) {
- $this->$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);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement