public void ThrowIfNeeded(BaseResult baseResult) { if (baseResult.Error && db.Setting.ThrowForServerErrors == true) { throw new ArangoServerException(baseResult); } }
protected void SetProperties(BaseResult baseResult) { this.Code = baseResult.Code; this.Error = baseResult.Error; this.ErrorMessage = baseResult.ErrorMessage; this.ErrorNum = baseResult.ErrorNum; }
public ArangoServerException(BaseResult baseResult) : base(string.Format("{0}. ErrorNumber: {1} HttpStatusCode: {2}",baseResult.ErrorMessage,baseResult.ErrorNum,baseResult.Code)) { }
public void Throw(BaseResult baseResult) { if (baseResult.Error) throw new ArangoServerException(baseResult); }