Skip to content

Commit 00bf6a2

Browse files
committed
standardize error handling
1 parent 1f97802 commit 00bf6a2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/code-snippets/updateMany.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package main
33
import (
44
"context"
55
"fmt"
6-
"log"
76

87
"go.mongodb.org/mongo-driver/bson"
98
"go.mongodb.org/mongo-driver/mongo"
@@ -34,7 +33,7 @@ func main() {
3433
// end updatemany
3534

3635
if err != nil {
37-
log.Fatal(err)
36+
panic(err)
3837
}
3938

4039
fmt.Printf("%v documents were updated.\n", result.ModifiedCount)

0 commit comments

Comments
 (0)