+
+ // SIMULATE ERROR: All records having odd-numbered ID have error.
+ if ($rec->id % 2) {
+ $res->success = false;
+ $res->message = "SIMULATED ERROR: Lorem ipsum dolor sit amet, placerat consectetuer, nec lacus imperdiet velit dui interdum vestibulum, sagittis lectus morbi, urna aliquet minus natoque commodo egestas non, libero libero arcu sed sed.";
+ } else {
+ $res->success = true;
+ $res->message = "Updated record";
+ }