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

Throw proper exceptions

This commit is contained in:
Matias Fontanini
2016-02-14 16:51:10 -08:00
parent 4123764a48
commit eb1c43d293
4 changed files with 101 additions and 41 deletions

View File

@@ -294,6 +294,26 @@ public:
}
};
/**
* \brief Exception thrown when a required callback for an object is not set
*/
class callback_not_set : public exception_base {
public:
const char* what() const throw() {
return "Callback not set";
}
};
/**
* \brief Exception thrown when an invalid packet is provided to some function
*/
class invalid_packet : public exception_base {
public:
const char* what() const throw() {
return "Invalid packet";
}
};
namespace Crypto {
namespace WPA2 {
/**