Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(errors): extract errors to libraries #126

Merged
merged 5 commits into from
Jul 20, 2023
Merged

Conversation

Rubilmax
Copy link
Contributor

@Rubilmax Rubilmax marked this pull request as ready for review July 13, 2023 12:39
QGarchery
QGarchery previously approved these changes Jul 13, 2023
Jean-Grimal
Jean-Grimal previously approved these changes Jul 13, 2023
@MerlinEgalite
Copy link
Contributor

I don't think it fixes #30 though

src/libraries/Errors.sol Outdated Show resolved Hide resolved
src/libraries/Errors.sol Outdated Show resolved Hide resolved
@Rubilmax
Copy link
Contributor Author

I don't think it fixes #30 though

It's a suggested fix. Namely, to use require with reason strings.

@Rubilmax Rubilmax dismissed stale reviews from Jean-Grimal and QGarchery via 0798cdf July 13, 2023 13:35
pakim249CAL
pakim249CAL previously approved these changes Jul 13, 2023
makcandrov
makcandrov previously approved these changes Jul 14, 2023
MerlinEgalite
MerlinEgalite previously approved these changes Jul 14, 2023
Copy link
Contributor

@MerlinEgalite MerlinEgalite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving but I still think that #30 should be kept open

Jean-Grimal
Jean-Grimal previously approved these changes Jul 14, 2023
@Rubilmax
Copy link
Contributor Author

Approving but I still think that #30 should be kept open

Why can't we settle the debate via this PR? Can't we expect reviewers to approve this PR iff they agree with the suggested way of raising errors?

Copy link
Contributor

@julien-devatom julien-devatom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZERO_AMOUNT is not tested

@MerlinEgalite
Copy link
Contributor

ZERO_AMOUNT is not tested

There are many tests missing we'll need to add lot of them once the codebase is settled.

QGarchery
QGarchery previously approved these changes Jul 17, 2023
@Rubilmax Rubilmax dismissed stale reviews from makcandrov and pakim249CAL via faa8645 July 19, 2023 09:15
@Rubilmax Rubilmax requested a review from MathisGD July 20, 2023 12:51
@MathisGD MathisGD merged commit 5e0b500 into main Jul 20, 2023
2 checks passed
@MathisGD MathisGD deleted the refactor/errors branch July 20, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extract errors to a separate file or use error codes Custom errors or require?
8 participants