Undo debug stack trace

This commit is contained in:
Neil Alexander 2020-04-20 15:09:15 +01:00
parent 42a046b5e9
commit db5d7f717b

View file

@ -19,7 +19,6 @@ import (
"context"
"database/sql"
"fmt"
"runtime/debug"
"github.com/lib/pq"
"github.com/matrix-org/dendrite/common"
@ -179,8 +178,7 @@ func (s *roomStatements) selectRoomVersionForRoomID(
stmt := common.TxStmt(txn, s.selectRoomVersionForRoomIDStmt)
err := stmt.QueryRowContext(ctx, roomID).Scan(&roomVersion)
if err == sql.ErrNoRows {
debug.PrintStack()
return roomVersion, fmt.Errorf("room ID %q not found", roomID)
return roomVersion, fmt.Errorf("room not found")
}
return roomVersion, err
}
@ -192,8 +190,7 @@ func (s *roomStatements) selectRoomVersionForRoomNID(
stmt := common.TxStmt(txn, s.selectRoomVersionForRoomNIDStmt)
err := stmt.QueryRowContext(ctx, roomNID).Scan(&roomVersion)
if err == sql.ErrNoRows {
debug.PrintStack()
return roomVersion, fmt.Errorf("room NID %d not found", roomNID)
return roomVersion, fmt.Errorf("room not found")
}
return roomVersion, err
}