mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
exception constructor outside of ifdef GNUC
This commit is contained in:
parent
648794b0bb
commit
de1932227b
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user