There are only a few legitimate "codes" that a SOAP fault can have and be understood by most clients in accordance with the protocol. You can't just pass in, for example, a database error code or you'll get a fatal error like "SoapFault::__construct(): Invalid parameters. Invalid fault code."
The ones you generally want to use are "Sender" where you've gotten bad parameters, or "Receiver" where the server has gotten an error for some reason.
See here:
http://www.w3.org/TR/soap12-part1/#faultcodes