summaryrefslogtreecommitdiffstats
path: root/src/interface_read_error.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface_read_error.hpp')
-rw-r--r--src/interface_read_error.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/interface_read_error.hpp b/src/interface_read_error.hpp
index 3c52178..beae472 100644
--- a/src/interface_read_error.hpp
+++ b/src/interface_read_error.hpp
@@ -2,11 +2,16 @@
#define GETIF_INTERFACE_READ_ERROR_H
#include <string>
+#include <iostream>
class interface_read_error {
public:
interface_read_error(std::string msg);
+ friend auto operator<<(std::ostream& os, interface_read_error const& ire) -> std::ostream& {
+ return os << "Interface read error: " << ire.errmsg;
+ };
+
private:
std::string errmsg;
};