18 lines
246 B
Go
18 lines
246 B
Go
package errors
|
|
|
|
type GomaxError struct {
|
|
Message string
|
|
Err error
|
|
}
|
|
|
|
func (ge *GomaxError) Error() string {
|
|
return ge.Err.Error()
|
|
}
|
|
|
|
func New(parent error, text string) error {
|
|
return &GomaxError{
|
|
Message: text,
|
|
Err: parent,
|
|
}
|
|
}
|