Avoid some catch all pattern, Avoid some string-byte conversions
Context
This is a wide-ranging MR with several localised changes to improve code quality.
- Avoids catching all exceptions, catch specific set of exceptions that can be be raised instead, or use a catching helper from Lwtreslib
- Avoid string-byte conversions (e.g.,
Data_encoding.of_string e sinstead ofData_encoding.of_bytes e (Bytes.of_string b))
It's not removing all instances of catch-all or conversions, but a significant number nonetheless.
Manually testing the MR
Normal tests: dune runtest
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment, theDevelopment Versionsection ofCHANGES.mdfor everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR -
-opambranch: raphael-p@avoid-catch-all-pattern-opam
Edited by Raphaël Proust