CashScript / cashscript

⚖️ Easily write and interact with Bitcoin Cash smart contracts
https://cashscript.org
MIT License
115 stars 80 forks source link

Improved error handling #50

Closed rkalis closed 4 years ago

rkalis commented 4 years ago

We currently have a FailedTransactionError, which should be subclassed into different error types. Also an enum with different error reasons should be provided by the CashScript SDK.

rkalis commented 4 years ago

Added this in https://github.com/Bitcoin-com/cashscript/commit/6cf1b8da90cc71c73817554d549d2ce82f427036. Added FailedSigCheckError, FailedTimeCheckError and FailedRequireError. Also exported a Reason enum with all possible Script failure reason strings. In the future additional strings that are unrelated to Script failures can be added.