[#CCoinsViewErrorCatcher] = CCoinsViewErrorCatcher :mrdocs: This is a minimally invasive approach to shutdown on LevelDB read errors from the chainstate, while keeping user interface out of the common library, which is shared between bitcoind, and bitcoin‐qt and non‐server tools. == Synopsis Declared in `<coins.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class CCoinsViewErrorCatcher final : public xref:CCoinsViewBacked.adoc[CCoinsViewBacked] ---- == Description Writes do not need similar protection, as failure to write is handled by the caller. == Base Classes [cols="1,4"] |=== | Name| Description | `xref:CCoinsViewBacked.adoc[CCoinsViewBacked]` | CCoinsView backed by another CCoinsView |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:CCoinsViewErrorCatcher/2constructor.adoc[`CCoinsViewErrorCatcher`] [.small]#[constructor]# | Construct the error catcher wrapping a backing view. | xref:CCoinsViewErrorCatcher/AddReadErrCallback.adoc[`AddReadErrCallback`] | Register a callback to run when a LevelDB read error occurs. | xref:CCoinsViewBacked/BatchWrite.adoc[`BatchWrite`] [.small]#[virtual]# | Forward the bulk write to the backing view. | xref:CCoinsViewBacked/EstimateSize.adoc[`EstimateSize`] [.small]#[virtual]# | Forward the size estimate to the backing view. | xref:CCoinsViewBacked/GetBestBlock.adoc[`GetBestBlock`] [.small]#[virtual]# | Forward the best‐block query to the backing view. | xref:CCoinsViewErrorCatcher/GetCoin.adoc[`GetCoin`] [.small]#[virtual]# | Retrieve a coin, running the error callbacks on a read failure. | xref:CCoinsViewBacked/GetHeadBlocks.adoc[`GetHeadBlocks`] [.small]#[virtual]# | Forward the head‐blocks query to the backing view. | xref:CCoinsViewErrorCatcher/HaveCoin.adoc[`HaveCoin`] [.small]#[virtual]# | Check whether an outpoint is unspent, running the error callbacks on a read failure. | xref:CCoinsViewErrorCatcher/PeekCoin.adoc[`PeekCoin`] [.small]#[virtual]# | Retrieve a coin without caching, running the error callbacks on a read failure. | xref:CCoinsViewBacked/SetBackend.adoc[`SetBackend`] | Replace the backing view. |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:CCoinsViewBacked/base.adoc[`base`] | The underlying view that all calls are forwarded to. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#