Exemple #1
0
        public static Exception CreateWebException(HttpStatusCode code, ResourceManagementException ex)
        {
            ExceptionData data = new ExceptionData(ex);

            data.CorrelationID = ex.CorrelationID;

            return(new WebFaultException <ExceptionData>(data, code));
        }
Exemple #2
0
 public static Exception CreateWebException(HttpStatusCode code, Exception ex, string details)
 {
     if (ex != null)
     {
         ExceptionData data = new ExceptionData(ex);
         data.Reason = details;
         return(new WebFaultException <ExceptionData>(data, code));
     }
     else
     {
         return(new WebFaultException(code));
     }
 }