Commit 27d4ed60 authored by Elias Broschin's avatar Elias Broschin
Browse files

stacktrace einkommentiert

parent 3b93dadf
//#ifndef __GDW_STACKTRACE_HPP__
//#define __GDW_STACKTRACE_HPP__
#ifndef __GDW_STACKTRACE_HPP__
#define __GDW_STACKTRACE_HPP__
//#include <string>
//#include <stdexcept>
#include <string>
#include <stdexcept>
//namespace gdw {
namespace gdw {
// extern void initStacktrace(std::string exeName);
extern void initStacktrace(std::string exeName);
// extern bool isStacktraceAvailable();
extern bool isStacktraceAvailable();
// extern std::string genStacktrace(std::size_t framesToSkip=0);
extern std::string genStacktrace(std::size_t framesToSkip=0);
// struct Error : public std::runtime_error {
// explicit Error(const std::string& msg)
// : std::runtime_error(msg+"\n At "+genStacktrace(1)) {}
// };
struct Error : public std::runtime_error {
explicit Error(const std::string& msg)
: std::runtime_error(msg+"\n At "+genStacktrace(1)) {}
};
//}
}
//#endif //__GDW_STACKTRACE_HPP__
#endif //__GDW_STACKTRACE_HPP__
......@@ -8,7 +8,7 @@
int main(int argc, char* argv[]) {
try {
//gdw::initStacktrace(argv[0]);
gdw::initStacktrace(argv[0]);
gdw::engine e;
e.run();
} catch (std::exception& ex) {
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment