提交 77e1f26d 编写于 作者: A astaxie

Merge pull request #728 from nizsheanez/null_pointer_panic_improve

[orm] improve null pointer panic message
.idea
.DS_Store
*.swp
*.swo
......@@ -131,6 +131,9 @@ func getFieldType(val reflect.Value) (ft int, err error) {
case reflect.String:
ft = TypeCharField
default:
if elm == nil {
panic(fmt.Errorf("%s is nil pointer, may be miss setting tag", val))
}
switch elm.Interface().(type) {
case sql.NullInt64:
ft = TypeBigIntegerField
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册