The base class OnlineUnlockStatus
has a pure virtual function void saveState (const String&)
.
I think it would be quite a common implementation to write something to a file in this override. The File class and the FileOutputStream class return either bools or Result
s to indicate success or failure. However, saveState
returns void to its caller, OnlineUnlockStatus::save()
, which in turn also returns void.
So I think in order to get the error back up to the call to OnlineUnlockStatus::save()
in the GUI, I would need to use an exception. Would it be a good improvement to have OnlineUnlockStatus::save()
and OnlineUnlockStatus::saveState()
return Result
s?