diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-01-16 22:38:44 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-06-13 17:29:46 +0100 |
commit | b38b845f49135217295b06f4c6e1f94c7175dac5 (patch) | |
tree | bf93c6cba6f64baebd5b700ea8bec7e41c434de7 /p2pvr/daemon | |
parent | DB layer reports length in bytes, not chars (diff) | |
download | p2pvr-b38b845f49135217295b06f4c6e1f94c7175dac5.tar.bz2 p2pvr-b38b845f49135217295b06f4c6e1f94c7175dac5.tar.xz p2pvr-b38b845f49135217295b06f4c6e1f94c7175dac5.zip |
Actually throw the exceptions in deserialize object and tidy up the select
Diffstat (limited to 'p2pvr/daemon')
-rw-r--r-- | p2pvr/daemon/sqlSelectDeserializer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/p2pvr/daemon/sqlSelectDeserializer.cpp b/p2pvr/daemon/sqlSelectDeserializer.cpp index 71e320d..8217f1e 100644 --- a/p2pvr/daemon/sqlSelectDeserializer.cpp +++ b/p2pvr/daemon/sqlSelectDeserializer.cpp @@ -132,11 +132,12 @@ void SqlSelectDeserializer::DeserializeObject(Slicer::ModelPartPtr mp) { if (!cmd.fetch()) { - std::invalid_argument("No rows returned"); + throw std::invalid_argument("No rows returned"); } DeserializeRow(mp); if (cmd.fetch()) { - std::invalid_argument("Too many rows returned"); + while (cmd.fetch()) ; + throw std::invalid_argument("Too many rows returned"); } } |