1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-28 04:34:27 +01:00

Added tins_cast as a replacement for dynamic_cast when using it on PDU classes.

This commit is contained in:
Matias Fontanini
2013-10-18 09:28:43 -03:00
parent 87fdd62b57
commit a507355e27
9 changed files with 59 additions and 9 deletions

View File

@@ -145,6 +145,16 @@ public:
return "Malformed option";
}
};
/**
* \brief Exception thrown when a call to tins_cast fails.
*/
class bad_tins_cast : public std::exception {
public:
const char *what() const throw() {
return "Bad Tins cast";
}
};
}
#endif // TINS_EXCEPTIONS_H