Skip to content

Commit

Permalink
Don't panic if there are no pstat results available
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Jun 29, 2020
1 parent f627585 commit 75fb600
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion database/src/pool/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,12 @@ impl Connection for SqliteConnection {
.query_row(params![&sid, &cid.0], |row| row.get(0))
.optional()
.unwrap_or_else(|e| {
panic!("{:?}: series={:?}, aid={:?}", e, sid, cid);
// work around https://github.com/rusqlite/rusqlite/issues/777
if let rusqlite::Error::InvalidColumnType(_, _, rusqlite::types::Type::Null) = e {
None
} else {
panic!("{:?}: series={:?}, aid={:?}", e, sid, cid);
}
})
})
})
Expand Down

0 comments on commit 75fb600

Please sign in to comment.