title: Custom SoapFault in PHP
body: <p>I was wondering if it's possible to catch custom SoapFaults in PHP. I can't get this piece of code working:</p>
  
  <pre><code>class UAC_ValidationFault extends SoapFault{
      public function __construct($code, $message){
          parent::__construct($code, $message);
     }
  }
  </code></pre>
  
  <p>So in my webservice I throw an error this way:</p>
  
  <pre><code>throw new UAC_ValidationFault("666", "Test error");
  </code></pre>
  
  <p>When I try to catch this error, I want to know the Classname of the custom error, but it's always "SoapFault":</p>
  
  <pre><code>try{
       $return = $client-&gt;testErrorThrow('bogus'); // $client is SoapClient instance
       print_r($return);
  }
  catch(UAC_ValidationFault $e){
       var_dump(get_class($e));  // isn't catched
  }
  catch(Exception $e){
       var_dump(get_class($e)); // returns "SoapFault"
  }
  </code></pre>
  
  <p>Any suggestions?</p>