1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35: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

@@ -100,6 +100,14 @@ public:
invalid_address() : exception_base("Invalid address") { }
};
/**
* \brief Exception thrown when a PDU option is set using an incorrect value
*/
class invalid_option_value : public exception_base {
public:
invalid_option_value() : exception_base("Invalid option value") { }
};
/**
* \brief Exception thrown when a field is not present in frame.
*/
@@ -204,6 +212,10 @@ public:
pcap_error(const char* message) : exception_base(message) {
}
pcap_error(const std::string& message) : exception_base(message) {
}
};
/**