gotosocial/vendor/codeberg.org/gruf/go-errors/v2/error_notrace.go
tobi 5004e0a9da
[bugfix] Fix remote media pruning failing if media already gone (#548)
* fix error check of prune to allow missing files

* update go-store library, add test for pruning item with db entry but no file

Signed-off-by: kim <grufwub@gmail.com>

* remove now-unneccessary error check

Signed-off-by: kim <grufwub@gmail.com>

Co-authored-by: kim <grufwub@gmail.com>
2022-05-08 18:49:45 +01:00

34 lines
496 B
Go

//go:build notrace
// +build notrace
package errors
type errormsg struct {
msg string
wrap error
}
func create(msg string, wrap error) *errormsg {
return &errormsg{
msg: msg,
wrap: wrap,
}
}
func (err *errormsg) Error() string {
return err.msg
}
func (err *errormsg) Is(target error) bool {
other, ok := target.(*errormsg)
return ok && (err.msg == other.msg)
}
func (err *errormsg) Unwrap() error {
return err.wrap
}
func (err *errormsg) Stacktrace() Callers {
return nil
}