1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 10:45:57 +01:00

Use custom exceptions everywhere

This commit is contained in:
Matias Fontanini
2017-05-13 10:59:15 -07:00
parent a5766a19c2
commit 64778f5412
14 changed files with 37 additions and 37 deletions

View File

@@ -63,7 +63,6 @@ using std::string;
using std::set;
using std::ifstream;
using std::istream;
using std::runtime_error;
namespace Tins {
namespace Utils {
@@ -147,12 +146,12 @@ vector<char> query_route_table(int family) {
mib[4] = NET_RT_DUMP;
mib[5] = 0;
if (sysctl(mib, 6, NULL, &len, NULL, 0) < 0) {
throw runtime_error("sysctl failed");
throw exception_base("sysctl failed");
}
buf.resize(len);
if (sysctl(mib, 6, &buf[0], &len, NULL, 0) < 0) {
throw runtime_error("sysctl failed");
throw exception_base("sysctl failed");
}
return buf;