title: WCF: use or not to use exception from service to client in production? any alternative?
body: <p>I am thinking in use some exceptions to from service to client.</p>
  
  <p>I am thinking for example in this case. The client try to insert a register in the database. This register has a value for e filed that exists in the database, and how it has a unique constraint, when I do the savechanges I get an updateException.</p>
  
  <p>I am thinking to use exceptions (faultException) to warn to client of the error, and use a custom class to send to the client the actual data of the register, so in this way the client does not to make other query for the register.</p>
  
  <p>However, in this <a href="https://msdn.microsoft.com/es-es/library/ms752208.aspx" rel="nofollow noreferrer">link</a>, it says that exceptions only should be used in development, no in production, so, without exceptions, how could I do what I want to do?</p>
  
  <p>Perhaps I could use a custom class, that have one list property for each type of entities, and a property bool, that indicates if the operation is right or wrong, other property with an arbitrary code to indicate the type of error... etc. This is a good alternative?</p>
  
  <p>In summary, really is better avoid exceptions in production? how I could communicate to the client errors from the service?</p>