budgit/internal/exception/exception.go
2025-12-12 11:54:20 -05:00

15 lines
260 B
Go

package exception
import "fmt"
type Exception struct {
Operation string
}
func New(operation string) *Exception {
return &Exception{Operation: operation}
}
func (e *Exception) WithError(err error) error {
return fmt.Errorf("%s: %w", e.Operation, err)
}