exception constructor outside of ifdef GNUC

This commit is contained in:
Christopher Lackner 2019-11-25 16:45:12 +01:00
parent 648794b0bb
commit de1932227b

View File

@ -1,6 +1,28 @@
#include "exception.hpp"
#include "utils.hpp"
namespace ngcore
{
Exception :: Exception(const std::string& s)
: m_what(s) {}
Exception :: Exception(const char* s)
: m_what(s) {}
void ThrowException(const std::string & s)
{
throw Exception (s);
}
void ThrowException(const char * s)
{
throw Exception (s);
}
} // namespace ngcore
// ********* STUFF FOR GETBACKTRACE ***************************
#ifdef __GNUC__
#include <execinfo.h>
@ -18,26 +40,6 @@
namespace ngcore
{
Exception :: Exception(const std::string& s)
: m_what(s) {}
Exception :: Exception(const char* s)
: m_what(s) {}
void ThrowException(const std::string & s)
{
throw Exception (s);
}
void ThrowException(const char * s)
{
throw Exception (s);
}
namespace detail
{
static int exec(std::string cmd, std::string & out) {