Support custom errors
Custom errors cannot be configured to be included in the Markdown report.
When I run solidity-docgen over a contract with lots of custom errors (such as the BalanceSheet), the custom errors are not included in the output.
Thanks for pointing this out! I'd like to fix this, hope I get the time. :pray:
@paulrberg This is solved in the upcoming rewrite (#350). I'll try it out with the contract that you shared!
Can you share an example of what you'd like the output to look like for errors?
This is solved in the upcoming rewrite (#350)
Glad to hear.
Can you share an example of what you'd like the output to look like for errors?
Well custom errors are annotated with NatSpec comments, just like any other function. So treating them as functions would be a good solution to start with. The only difference would be that the errors would be placed under another upper header "Custom Errors", and not under "Functions".
To take BalanceSheet__BorrowMaxBonds as an example, this is the Markdown output that I would like to see when using our Handlebars template:
## Custom Errors
### BalanceSheet__BorrowMaxBonds
\```solidity
error BalanceSheet__BorrowMaxBonds(
IHToken bond,
uint256 newBondListLength,
uint256 maxBonds
);
\```
Emitted when the account exceeds the maximum numbers of bonds permitted.