Use default error messages

This commit is contained in:
Joshua Hong 2021-07-21 14:50:52 -04:00
parent 6f83d829d8
commit 32b78b0881
2 changed files with 2 additions and 3 deletions

View file

@ -61,7 +61,7 @@ func Open(dbProperties *config.DatabaseOptions, cache caching.RoomServerCaches)
// Then prepare the statements. Now that the migrations have run, any columns referred // Then prepare the statements. Now that the migrations have run, any columns referred
// to in the database code should now exist. // to in the database code should now exist.
if err := d.prepare(db, cache); err != nil { if err := d.prepare(db, cache); err != nil {
return nil, fmt.Errorf("Error preparing statements: %v", err) return nil, err
} }
return &d, nil return &d, nil

View file

@ -18,7 +18,6 @@ package sqlite3
import ( import (
"context" "context"
"database/sql" "database/sql"
"fmt"
_ "github.com/mattn/go-sqlite3" _ "github.com/mattn/go-sqlite3"
@ -72,7 +71,7 @@ func Open(dbProperties *config.DatabaseOptions, cache caching.RoomServerCaches)
// Then prepare the statements. Now that the migrations have run, any columns referred // Then prepare the statements. Now that the migrations have run, any columns referred
// to in the database code should now exist. // to in the database code should now exist.
if err := d.prepare(db, cache); err != nil { if err := d.prepare(db, cache); err != nil {
return nil, fmt.Errorf("Error preparing statements: %v", err) return nil, err
} }
return &d, nil return &d, nil