Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Sommersemester 2015
Cpp
Deth Buff Arr
Commits
4906dc48
Commit
4906dc48
authored
Sep 21, 2015
by
Elias Broschin
Browse files
movement_component added
parent
7b756e8d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
include/util/stacktrace.hpp
View file @
4906dc48
//
#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__
src/main.cpp
View file @
4906dc48
...
...
@@ -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
)
{
...
...
src/util/stacktrace.cpp
View file @
4906dc48
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment