я должен обернуть весь мой код службы WCF в блоке try catch?

<code>try
{
    ///// here is the code that might throw erros. If I discover the user is unauthorized I throw a WebFaultException myself to alert the client
}      
catch (WebFaultException ex)
{
    throw ex; //but if I wrap all code in try-catch, I have to rethrow the exception o the status code reaches the client
}
catch (Exception ex)
{
    throw new WebFaultException(ex.Message, HttpStatusCode.InternalServerError);
}
</code>

Должен ли я обернуть все в try-catch, или что вы посоветуете? Я использую WCF с сервисами JSON для отдыха

Ответы на вопрос(1)

Ваш ответ на вопрос