mirror of https://github.com/go-gorm/gorm.git
23 lines
588 B
Go
23 lines
588 B
Go
|
package gorm
|
||
|
|
||
|
import "errors"
|
||
|
|
||
|
var (
|
||
|
// ErrRecordNotFound record not found error
|
||
|
ErrRecordNotFound = errors.New("record not found")
|
||
|
// ErrInvalidSQL invalid SQL error, happens when you passed invalid SQL
|
||
|
ErrInvalidSQL = errors.New("invalid SQL")
|
||
|
// ErrInvalidTransaction invalid transaction when you are trying to `Commit` or `Rollback`
|
||
|
ErrInvalidTransaction = errors.New("no valid transaction")
|
||
|
// ErrUnaddressable unaddressable value
|
||
|
ErrUnaddressable = errors.New("using unaddressable value")
|
||
|
)
|
||
|
|
||
|
type Error struct {
|
||
|
Err error
|
||
|
}
|
||
|
|
||
|
func (e Error) Unwrap() error {
|
||
|
return e.Err
|
||
|
}
|