Exemplo n.º 1
0
 private void InitOption(HttpStatus status, HttpCause cause)
 {
     this.mStatus = status;
     this.mCause = cause;
     this.mHttpErrorResponse = null;
     this.mWebStatus = WebExceptionStatus.Success;
 }
Exemplo n.º 2
0
 public HttpExceptionEx(HttpStatus status, HttpCause cause, string message)
 {
     this.InitOption(status, cause);
     try
     {
         Exception exception = new Exception(message);
         throw exception;
     }
     catch (Exception exception2)
     {
         this.mException = exception2;
     }
 }
Exemplo n.º 3
0
 public HttpExceptionEx(HttpStatus status, HttpCause cause, object baseException)
 {
     this.InitOption(status, cause);
     if (baseException.GetType() == typeof(WebException))
     {
         this.mException = (WebException) baseException;
         this.mWebStatus = ((WebException) baseException).Status;
         this.mHttpErrorResponse = (HttpWebResponse) ((WebException) baseException).Response;
     }
     else
     {
         this.mException = (Exception) baseException;
     }
 }