Skip to content

Commit

Permalink
fixed: better error
Browse files Browse the repository at this point in the history
  • Loading branch information
primalmotion committed Apr 10, 2019
1 parent 55e1383 commit 08c7b06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manipmongo/helpers.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package manipmongo

import (
"fmt"
"strconv"

"github.com/globalsign/mgo"
Expand Down Expand Up @@ -69,7 +70,7 @@ func CreateIndex(manipulator manipulate.Manipulator, identity elemental.Identity
index.Name = "index_" + identity.Name + "_" + strconv.Itoa(i)
}
if err := collection.EnsureIndex(index); err != nil {
return err
return fmt.Errorf("unable to ensure index '%s': %s", index.Name, err)
}
}

Expand Down

0 comments on commit 08c7b06

Please sign in to comment.