mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-24 13:52:16 +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.
|
// be of this type.
|
||||||
//
|
//
|
||||||
|
|
||||||
struct falco_exception : std::exception
|
struct falco_exception : std::runtime_error
|
||||||
{
|
{
|
||||||
falco_exception()
|
using std::runtime_error::runtime_error;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace falco_common
|
namespace falco_common
|
||||||
|
Loading…
Reference in New Issue
Block a user