Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Source/System/RTEError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,23 @@
#include <sys/utsname.h>
#include <fstream>
#include <filesystem>
#include "backward/backward.hpp"
#elif defined(__APPLE__) && defined(__MACH__)
#include <sys/sysctl.h>
#include "backward/backward.hpp"
#endif


using namespace RTE;

bool RTEError::s_CurrentlyAborting = false;
bool RTEError::s_IgnoreAllAsserts = false;
std::string RTEError::s_LastIgnoredAssertDescription = "";
std::source_location RTEError::s_LastIgnoredAssertLocation = {};

#if (defined(__linux__) || (defined(__APPLE__) && defined(__MACH__)))
backward::SignalHandling sh;
#endif
#ifdef _WIN32
/// <summary>
/// Custom exception handler for Windows SEH.
Expand Down Expand Up @@ -347,6 +353,13 @@ void RTEError::AbortFunc(const std::string& description, const std::source_locat
#ifdef _WIN32
RTEStackTrace stackTrace;
callstack += ("\n\n" + stackTrace.GetCallStackAsString());
#else
backward::StackTrace st;
st.load_here();
backward::Printer printer;
std::ostringstream stack;
printer.print(st, stack);
callstack = stack.str();
#endif

std::string consoleSaveMsg;
Expand Down
Loading
Loading