exceptions: Make Tlv::Error a base class for all packet-processing exceptions
This commit also includes a number of code style fixes.
Change-Id: I44f83915e733b43d5f43b4266902c8262e928d91
Refs: #1528
diff --git a/src/transport/tcp-transport.hpp b/src/transport/tcp-transport.hpp
index 6795580..db90ae4 100644
--- a/src/transport/tcp-transport.hpp
+++ b/src/transport/tcp-transport.hpp
@@ -26,11 +26,11 @@
~TcpTransport();
// from Transport
- virtual void
+ virtual void
connect(boost::asio::io_service& ioService,
const ReceiveCallback& receiveCallback);
-
- virtual void
+
+ virtual void
close();
virtual void
@@ -39,10 +39,10 @@
virtual void
resume();
- virtual void
+ virtual void
send(const Block& wire);
- virtual void
+ virtual void
send(const Block& header, const Block& payload);
private:
diff --git a/src/transport/transport.hpp b/src/transport/transport.hpp
index 08740fb..eda9521 100644
--- a/src/transport/transport.hpp
+++ b/src/transport/transport.hpp
@@ -12,7 +12,8 @@
namespace ndn {
-class Transport {
+class Transport
+{
public:
class Error : public std::runtime_error
{
diff --git a/src/transport/unix-transport.cpp b/src/transport/unix-transport.cpp
index ad6db2c..4dc636a 100644
--- a/src/transport/unix-transport.cpp
+++ b/src/transport/unix-transport.cpp
@@ -30,11 +30,11 @@
{
return parsed.get<std::string>("unix_socket");
}
- catch (const boost::property_tree::ptree_bad_path& error)
+ catch (boost::property_tree::ptree_bad_path& error)
{
// unix_socket not present, continue
}
- catch (const boost::property_tree::ptree_bad_data& error)
+ catch (boost::property_tree::ptree_bad_data& error)
{
throw ConfigFile::Error(error.what());
}