Skip to content
New issue

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

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

Already on GitHub? # to your account

Error: Make Error Struct Constructor Private #31

Closed
threeal opened this issue Jul 6, 2023 · 0 comments · Fixed by #33
Closed

Error: Make Error Struct Constructor Private #31

threeal opened this issue Jul 6, 2023 · 0 comments · Fixed by #33
Assignees
Labels

Comments

@threeal
Copy link
Owner

threeal commented Jul 6, 2023

Make the constructor of the Error struct private to prevent direct instantiation. Instead, introduce a new make function to create a new error with a specific message. Alternatively, users can continue using the existing format function to create a new error while formatting its message.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant