Mercurial > code
comparison C++/Driver.cpp @ 189:cc1e5fe1ee2c
Update drivers to style and using instead of typedefs
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 26 Nov 2013 20:36:59 +0100 |
parents | 4c746050969a |
children | 6c49e5e3ecc8 |
comparison
equal
deleted
inserted
replaced
188:ce3e1c3d6fed | 189:cc1e5fe1ee2c |
---|---|
43 void Query::assertRequest(int row, const std::string &column, ColumnType wanted) | 43 void Query::assertRequest(int row, const std::string &column, ColumnType wanted) |
44 { | 44 { |
45 std::ostringstream oss; | 45 std::ostringstream oss; |
46 | 46 |
47 // Out of bounds? | 47 // Out of bounds? |
48 if (row < 0 || row >= countRows()) | 48 if (row < 0 || row >= countRows()) { |
49 { | |
50 oss << "Invalid row index " << row; | 49 oss << "Invalid row index " << row; |
51 oss << ", expected [0.." << countRows() << "]"; | 50 oss << ", expected [0.." << countRows() << "]"; |
52 | 51 |
53 throw Error(oss.str()); | 52 throw Error(oss.str()); |
54 } | 53 } |
55 | 54 |
56 // Not found or bad column? | 55 // Not found or bad column? |
57 if (type(column) != wanted) | 56 if (type(column) != wanted) { |
58 { | |
59 oss << "Invalid or not found column `" << column << "'"; | 57 oss << "Invalid or not found column `" << column << "'"; |
60 | 58 |
61 throw Error(oss.str()); | 59 throw Error(oss.str()); |
62 } | 60 } |
63 } | 61 } |