Skip to content

Error: Make Error Struct Constructor Private #31

Closed
@threeal

Description

@threeal

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions