mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 01:33:10 -06:00
Use default error messages
This commit is contained in:
parent
6f83d829d8
commit
32b78b0881
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue