[#466] Improve `readContract`'s error message
Description
Problem: ImportContractError
will be displayed in one line. The error
message contains two michelson types, and these types can get very big
(see:
https://github.com/tqtezos/stablecoin/pull/135#discussion_r530850855).
This makes the message really hard to read and to spot where the
difference between the two types is.
Additionally ICEUnexpectedParamType
/ICEUnexpectedStorageType
will
show the unexpected Type
with annotations and the expected Type
without annotations. Again, this makes it harder to spot the difference
between the two types, which can be very subtle.
Solution:
- Display the error in multiple lines, each type goes on its own line
- Show both the expected and unexpected types without annotations
Related issue(s)
Resolves #466 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.