[go: up one dir, main page]

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 s instead of Data_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.rst for the protocol and the environment, the Development Version section of CHANGES.md for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
  • -opam branch: raphael-p@avoid-catch-all-pattern-opam
Edited by Raphaël Proust

Merge request reports

Loading