github.com/tencent/goom@v1.0.1/erro/type_not_found.go (about) 1 package erro 2 3 // TypeNotFound 类型没有找到 4 type TypeNotFound struct { 5 typName string 6 } 7 8 // Error 返回错误字符串 9 func (t *TypeNotFound) Error() string { 10 return "type not found: " + t.typName 11 } 12 13 // NewTypeNotFoundError 创建类型未找到异常 14 // typName 类型名称 15 func NewTypeNotFoundError(typName string) error { 16 return &TypeNotFound{ 17 typName: typName, 18 } 19 }