1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-28 12:44:25 +01:00

Added PDU::rfind_pdu.

This commit is contained in:
Matias Fontanini
2013-04-19 22:27:48 -03:00
parent 91bdcca577
commit 2ea952d6ab
8 changed files with 83 additions and 22 deletions

View File

@@ -48,7 +48,7 @@ public:
};
/**
* \brief Exception thrown when an option is not found.
* \brief Exception thrown when a malformed packet is parsed.
*/
class malformed_packet : public std::runtime_error {
public:
@@ -56,7 +56,20 @@ public:
: std::runtime_error(std::string()) { }
const char* what() const throw() {
return "Option not found";
return "Malformed packet";
}
};
/**
* \brief Exception thrown when a PDU is not found when using PDU::rfind_pdu.
*/
class pdu_not_found : public std::runtime_error {
public:
pdu_not_found()
: std::runtime_error(std::string()) { }
const char* what() const throw() {
return "PDU not found";
}
};
}