Bug 443059 - Revise snapshot contracts with regard to exceptions
Summary: Revise snapshot contracts with regard to exceptions
Status: RESOLVED FIXED
Alias: None
Product: Handly
Classification: Technology
Component: Core (show other bugs)
Version: 0.1   Edit
Hardware: All All
: P3 enhancement
Target Milestone: 0.2   Edit
Assignee: Vladimir Piskarev CLA
QA Contact:
URL:
Whiteboard: breakingchange
Keywords: api
Depends on:
Blocks:
 
Reported: 2014-09-02 03:50 EDT by Vladimir Piskarev CLA
Modified: 2014-09-03 01:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Piskarev CLA 2014-09-02 03:50:10 EDT
Currently, ISnapshot methods may throw CoreException in case of underlying resource failure, and dealing with it in the client code quickly becomes unwieldy, whereas most ISnapshot implementations are not expected to throw it. (Only TextFileSnapshot can throw it for the time being.)

Instead of throwing a CoreException in case of underlying resource failure, the affected snapshot could log the error and expire. Although a breaking change, this should make the contract more straightforward.
Comment 1 Vladimir Piskarev CLA 2014-09-02 07:57:49 EDT
ISnapshotProvider can also get rid of CoreException.
Comment 2 Vladimir Piskarev CLA 2014-09-02 08:37:49 EDT
Pushed to master.
commit b07afea03ad8ef589ba799cdd2149c82bfb1a7f7