Postpone error until no more retries are available
Error messages generated from tasks that have retries are often short
lived and not actionable. These errors should wait until no more
retries are available before being shown.
Before this CL, All error codes are written directly to the database
when a event is triggered. After this CL, writing to the database
requires a VoicemailStatus.Editor() object to be passed in. Usually
the object will be the same direct-write object as before. But in
retrying tasks, the object passed in will have the writes deferred
until the result of the task is determined. The writes will only be
committed if the task is successful or no more retries are left.
Passing a error handling object deep down is not ideal. A better way
will be throwing a exception back up so the task can decide how to
handle it. Unfortunately, deeper codes cannot handle escaping
exceptions gracefully, and changing it involves too much risk at this
moment.
+ Subsequent activation does not show the activating message
Fixes: 30284894
Change-Id: I523e8aa2f89ff3af13016eccd2392cee302e79dc
21 files changed