Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed most throw declarations (deprecated by C++0x and dangerous)

  • Loading branch information...
commit a690f14c5b786ba42603077192c0df03ae529313 1 parent e681c50
@paoloambrosio authored
View
18 include/cucumber-cpp/internal/Table.hpp
@@ -18,8 +18,22 @@ class Table {
typedef basic_type row_type;
typedef std::vector<hash_row_type> hashes_type;
- void addColumn(const std::string column) throw (std::runtime_error);
- void addRow(const row_type &row) throw (std::range_error, std::runtime_error);
+ /**
+ * @brief addColumn
+ * @param column
+ *
+ * @throws std::runtime_error
+ */
+ void addColumn(const std::string column);
+
+ /**
+ * @brief addRow
+ * @param row
+ *
+ * @throws std::range_error
+ * @throws std::runtime_error
+ */
+ void addRow(const row_type &row);
const hashes_type & hashes() const;
private:
View
6 include/cucumber-cpp/internal/connectors/wire/WireProtocol.hpp
@@ -130,8 +130,10 @@ class WireMessageCodec {
* @param One single message to decode
*
* @return The decoded command (ownership passed to the caller)
+ *
+ * @throws WireMessageCodecException
*/
- virtual WireCommand *decode(const std::string &request) const throw(WireMessageCodecException) = 0;
+ virtual WireCommand *decode(const std::string &request) const = 0;
/**
* Encodes a response to wire format.
@@ -151,7 +153,7 @@ class WireMessageCodec {
class JsonSpiritWireMessageCodec : public WireMessageCodec {
public:
JsonSpiritWireMessageCodec();
- WireCommand *decode(const std::string &request) const throw(WireMessageCodecException);
+ WireCommand *decode(const std::string &request) const;
const std::string encode(const WireResponse *response) const;
};
View
4 src/Table.cpp
@@ -3,7 +3,7 @@
namespace cucumber {
namespace internal {
-void Table::addColumn(const std::string column) throw (std::runtime_error) {
+void Table::addColumn(const std::string column) {
if (rows.empty()) {
columns.push_back(column);
} else {
@@ -11,7 +11,7 @@ void Table::addColumn(const std::string column) throw (std::runtime_error) {
}
}
-void Table::addRow(const row_type &row) throw (std::range_error, std::runtime_error) {
+void Table::addRow(const row_type &row) {
const basic_type::size_type colSize = columns.size();
if (colSize == 0) {
throw std::runtime_error("No column defined yet");
View
2  src/connectors/wire/WireProtocol.cpp
@@ -204,7 +204,7 @@ static std::map<std::string, boost::shared_ptr<CommandDecoder> > commandDecoders
JsonSpiritWireMessageCodec::JsonSpiritWireMessageCodec() {};
-WireCommand *JsonSpiritWireMessageCodec::decode(const std::string &request) const throw(WireMessageCodecException) {
+WireCommand *JsonSpiritWireMessageCodec::decode(const std::string &request) const {
std::istringstream is(request);
mValue json;
try {
Please sign in to comment.
Something went wrong with that request. Please try again.