New creates a new XError with message
(format string, args ...any)
| 24 | |
| 25 | // New creates a new XError with message |
| 26 | func New(format string, args ...any) *XError { |
| 27 | err := newXError() |
| 28 | err.message = fmt.Sprintf(format, args...) |
| 29 | return err |
| 30 | } |
| 31 | |
| 32 | // Wrap creates a new XError and add message. |
| 33 | func Wrap(cause error, message ...any) *XError { |