protected static void check_error(TargetError error) { if (error == TargetError.None) return; throw new TargetException (error); }