private void InitOption(HttpStatus status, HttpCause cause) { this.mStatus = status; this.mCause = cause; this.mHttpErrorResponse = null; this.mWebStatus = WebExceptionStatus.Success; }
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; } }
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; } }