Пример #1
0
        private void IsResponseException(Exception exception)
        {
            var exc = exception as ResponseException;

            if (exc != null)
            {
                ExceptionData = exc.ExceptionData;
            }
        }
Пример #2
0
 public ResponseException(HttpStatusCode code, ModelStateDictionary modelState)
 {
     ExceptionData = new ExceptionData
     {
         ModelState = modelState,
         Code       = code,
         Time       = Utilities.GetServerTime()
     };
 }
Пример #3
0
 public ResponseException(HttpStatusCode code, string reason, string innerMessage = "", Utilities.ExceptionType type = Utilities.ExceptionType.Unknown,
                          params object[] arguments)
 {
     ExceptionData = new ExceptionData
     {
         Reason       = reason,
         InnerMessage = innerMessage,
         Type         = type,
         Code         = code,
         Arguments    = arguments,
         Time         = Utilities.GetServerTime()
     };
 }