mirror of
https://github.com/hamburghammer/gstat.git
synced 2024-06-17 00:36:02 +02:00
14 lines
258 B
Go
14 lines
258 B
Go
package errors
|
|
|
|
import "fmt"
|
|
|
|
// BaseError is a custom error with some extra fields.
|
|
type BaseError struct {
|
|
Operation string
|
|
Message string
|
|
}
|
|
|
|
func (e BaseError) Error() string {
|
|
return fmt.Sprintf("%s failed because of: %s", e.Operation, e.Message)
|
|
}
|