#error-code #error #error-derive

macro error-enum

Provide a easy way to define an enum that represents errors with error codes, document comments and several other functionalities

6 releases (3 breaking)

0.4.1 Feb 8, 2024
0.4.0 Feb 8, 2024
0.3.0 Feb 8, 2024
0.2.2 Sep 29, 2023
0.1.0 Sep 28, 2023

#547 in Procedural macros

MIT/Apache

40KB
974 lines

Error with Codes

Used to generate documentation comments and Display for error types.


lib.rs:

To generate Display implementation and documentation comments for error types.

Concept Example
Number 1234
Code E1234
Category E
Kind error[E1234]
Message Category error[E1234]:
Description Access denied.
Message error[E1234]: Access denied.

Dependencies

~0.2–0.9MB
~16K SLoC