First Commit
This commit is contained in:
17
errors.go
Normal file
17
errors.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package mellaris
|
||||
|
||||
import "fmt"
|
||||
|
||||
// ConfigError indicates a configuration issue.
|
||||
type ConfigError struct {
|
||||
Field string
|
||||
Err error
|
||||
}
|
||||
|
||||
func (e ConfigError) Error() string {
|
||||
return fmt.Sprintf("invalid config: %s: %s", e.Field, e.Err)
|
||||
}
|
||||
|
||||
func (e ConfigError) Unwrap() error {
|
||||
return e.Err
|
||||
}
|
||||
Reference in New Issue
Block a user