Remove custom err type

err
This commit is contained in:
Nikita Tokarchuk
2020-03-06 00:21:17 +01:00
parent deac951551
commit db6c11f455
14 changed files with 52 additions and 87 deletions
+2 -2
View File
@@ -2,12 +2,12 @@ package database
import (
"context"
"fmt"
"reflect"
"go.mongodb.org/mongo-driver/mongo"
"github.com/mainnika/mongox-go-driver/v2/mongox"
"github.com/mainnika/mongox-go-driver/v2/mongox/errors"
)
// Database handler
@@ -78,5 +78,5 @@ func (d *Database) GetCollectionOf(document interface{}) mongox.MongoCollection
return d.client.Database(d.dbname).Collection(found)
}
panic(errors.InternalErrorf("document %v does not have a collection tag", document))
panic(fmt.Errorf("document %v does not have a collection tag", document))
}