This commit is contained in:
John Guo
2022-02-22 10:43:31 +08:00
parent 7812f41b43
commit afa58ed45b
6 changed files with 131 additions and 9 deletions

View File

@ -408,11 +408,9 @@ func doNewByNode(node ConfigNode, group string) (db DB, err error) {
}
return c.db, nil
}
return nil, gerror.NewCodef(
gcode.CodeInvalidConfiguration,
`cannot find database driver for specified database type "%s", did you misspell type name "%s" or forget importing the database driver?`,
node.Type, node.Type,
)
errorMsg := `cannot find database driver for specified database type "%s"`
errorMsg += `, did you misspell type name "%s" or forget importing the database driver?`
return nil, gerror.NewCodef(gcode.CodeInvalidConfiguration, errorMsg, node.Type, node.Type)
}
// Instance returns an instance for DB operations.