mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-23 21:37:48 +00:00
refactor: make falco_exception a std::runtime_error
The implementation provides more or less the same implementation and thus it makes more sense to base it on std::runtime_error. Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
This commit is contained in:
parent
f6498cd8bd
commit
42f90817ad
@ -34,27 +34,9 @@ limitations under the License.
|
||||
// be of this type.
|
||||
//
|
||||
|
||||
struct falco_exception : std::exception
|
||||
struct falco_exception : std::runtime_error
|
||||
{
|
||||
falco_exception()
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~falco_exception() throw()
|
||||
{
|
||||
}
|
||||
|
||||
explicit falco_exception(std::string error_str)
|
||||
: m_error_str(error_str)
|
||||
{
|
||||
}
|
||||
|
||||
char const* what() const throw()
|
||||
{
|
||||
return m_error_str.c_str();
|
||||
}
|
||||
|
||||
std::string m_error_str;
|
||||
using std::runtime_error::runtime_error;
|
||||
};
|
||||
|
||||
namespace falco_common
|
||||
|
Loading…
Reference in New Issue
Block a user