void CheckErrorResponse(LingrResponse res) { if (res.Status != "ok") throw new LingrException (res); }
public LingrException(LingrResponse source) : base(String.Concat (source.ErrorDetail, "(error code: ", source.ErrorCode, ")")) { }
void FillStatus(LingrResponse r, JsonObject j) { r.Status = (string) j.Get ("status"); r.ErrorCode = (string) j.Get ("code"); r.ErrorDetail = (string) j.Get ("detail"); }