catch error
This commit is contained in:
parent
b8e862bbb6
commit
d97f1332d6
@ -1625,11 +1625,17 @@ func (self *PostgresDatabase) GetLastAndFirstForGroup(group string) (last, first
|
|||||||
|
|
||||||
func (self *PostgresDatabase) GetMessageIDForNNTPID(group string, id int64) (msgid string, err error) {
|
func (self *PostgresDatabase) GetMessageIDForNNTPID(group string, id int64) (msgid string, err error) {
|
||||||
err = self.conn.QueryRow(self.stmt[GetMessageIDForNNTPID], group, id).Scan(&msgid)
|
err = self.conn.QueryRow(self.stmt[GetMessageIDForNNTPID], group, id).Scan(&msgid)
|
||||||
|
if err == sql.ErrNoRows {
|
||||||
|
err = nil
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *PostgresDatabase) GetNNTPIDForMessageID(group, msgid string) (id int64, err error) {
|
func (self *PostgresDatabase) GetNNTPIDForMessageID(group, msgid string) (id int64, err error) {
|
||||||
err = self.conn.QueryRow(self.stmt[GetNNTPIDForMessageID], group, msgid).Scan(&id)
|
err = self.conn.QueryRow(self.stmt[GetNNTPIDForMessageID], group, msgid).Scan(&id)
|
||||||
|
if err == sql.ErrNoRows {
|
||||||
|
err = nil
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user