public static void Check(Rpr.Status status) { if (status != Rpr.Status.SUCCESS) { throw new Exception(status.ToString()); } //return status == Rpr.Status.SUCCESS; }
static void Check(int result) { Rpr.Status res = (Rpr.Status)result; if (Rpr.Status.SUCCESS != res) { var name = new StackFrame(1).GetMethod().Name; var message = string.Format("Error in Rpr.cs, method ({0}) result is {1}", name, res); throw new RprException(res, message); } }