mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 03:43:11 -06:00
Undo debug stack trace
This commit is contained in:
parent
42a046b5e9
commit
db5d7f717b
|
|
@ -19,7 +19,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
"runtime/debug"
|
|
||||||
|
|
||||||
"github.com/lib/pq"
|
"github.com/lib/pq"
|
||||||
"github.com/matrix-org/dendrite/common"
|
"github.com/matrix-org/dendrite/common"
|
||||||
|
|
@ -179,8 +178,7 @@ func (s *roomStatements) selectRoomVersionForRoomID(
|
||||||
stmt := common.TxStmt(txn, s.selectRoomVersionForRoomIDStmt)
|
stmt := common.TxStmt(txn, s.selectRoomVersionForRoomIDStmt)
|
||||||
err := stmt.QueryRowContext(ctx, roomID).Scan(&roomVersion)
|
err := stmt.QueryRowContext(ctx, roomID).Scan(&roomVersion)
|
||||||
if err == sql.ErrNoRows {
|
if err == sql.ErrNoRows {
|
||||||
debug.PrintStack()
|
return roomVersion, fmt.Errorf("room not found")
|
||||||
return roomVersion, fmt.Errorf("room ID %q not found", roomID)
|
|
||||||
}
|
}
|
||||||
return roomVersion, err
|
return roomVersion, err
|
||||||
}
|
}
|
||||||
|
|
@ -192,8 +190,7 @@ func (s *roomStatements) selectRoomVersionForRoomNID(
|
||||||
stmt := common.TxStmt(txn, s.selectRoomVersionForRoomNIDStmt)
|
stmt := common.TxStmt(txn, s.selectRoomVersionForRoomNIDStmt)
|
||||||
err := stmt.QueryRowContext(ctx, roomNID).Scan(&roomVersion)
|
err := stmt.QueryRowContext(ctx, roomNID).Scan(&roomVersion)
|
||||||
if err == sql.ErrNoRows {
|
if err == sql.ErrNoRows {
|
||||||
debug.PrintStack()
|
return roomVersion, fmt.Errorf("room not found")
|
||||||
return roomVersion, fmt.Errorf("room NID %d not found", roomNID)
|
|
||||||
}
|
}
|
||||||
return roomVersion, err
|
return roomVersion, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue