mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-05 14:10:27 -04:00
add config option sdl_renderer_driver
This commit is contained in:
parent
f383260a98
commit
93ec526482
9 changed files with 56 additions and 8 deletions
|
@ -4,6 +4,7 @@
|
|||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include "error.h"
|
||||
#include "platform.h"
|
||||
|
||||
|
@ -38,3 +39,18 @@ void send_log_impl(const char *format, ...) {
|
|||
void throw_exception(const char *text) {
|
||||
throw std::runtime_error(std::string("Invoked crash:") + text);
|
||||
}
|
||||
|
||||
std::string exception_to_string(const std::exception& e) {
|
||||
std::ostringstream oss;
|
||||
oss << e.what();
|
||||
|
||||
try {
|
||||
std::rethrow_if_nested(e);
|
||||
} catch (const std::exception& nested) {
|
||||
oss << " Reason: " << exception_to_string(nested);
|
||||
} catch (...) {
|
||||
oss << " Reason: unknown exception of crash";
|
||||
}
|
||||
|
||||
return std::move(oss).str();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue