IntersectMBO / IntersectMBO/ouroboros-consensus

Avoid pure exceptions in encoders

Open
#652 0 comments 0 reactions 0 assignees View on GitHub
technical debt
Dominant language
Haskell
Stars
67
Forks
43
Avg merge
5d 13h
Merged PRs (30d)
43

Description

Currently, we throw a pure exception in an encoder when it is asked to encode something it doesn't support, e.g., CardanoBlock encoding a Shelley block with the hard fork disabled. Using something like `Either` or `Except` would be better.

This will require cooperation from the network layer because the codecs that use the encoders are defined there.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.