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:
Samuel Gaist 2024-02-11 22:28:10 +01:00 committed by poiana
parent f6498cd8bd
commit 42f90817ad

View File

@ -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