コード例 #1
0
 /// <summary>
 /// To the ex response.
 /// </summary>
 /// <param name="ex">The ex.</param>
 /// <returns></returns>
 private List <HandledResponseError> ToExResponse(HandledException ex)
 {
     return(ToExResponse(new List <HandledException>()
     {
         ex
     }));
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HandledException"/> class.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="message">The error message to display.</param>
 /// <param name="exception">The exception.</param>
 /// <param name="status">The status.</param>
 public HandledException(ExceptionType type, string message, HandledException exception, HttpStatusCode status = HttpStatusCode.BadRequest)
     : base(message, exception)
 {
     ErrorCode       = DefaultErrorCode;
     ExceptionType   = type;
     StatusCode      = status;
     InnerExceptions = new List <HandledException>();
     InnerExceptions.Add(exception);
 }