Joedb 10.0.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
assert.cpp
Go to the documentation of this file.
2
3#include <algorithm>
4#include <string>
5#include <string_view>
6
7namespace joedb
8{
9 std::string get_error_message
10 (
11 const char *condition,
12 const char *full_file,
13 const char *function,
14 int line
15 )
16 {
17 std::string cpp_file(full_file);
18 std::replace(cpp_file.begin(), cpp_file.end(), '\\', '/');
19 size_t pos = cpp_file.find("joedb/src/joedb");
20 std::string_view file(cpp_file);
21 if (pos != std::string::npos)
22 file.remove_prefix(pos + 10);
23 return std::string(file) + ":" + std::to_string(line) + ":" + function + ":!(" + condition + ")";
24 }
25}
Definition Blob.h:7
std::string get_error_message(const char *condition, const char *full_file, const char *function, int line)
Definition assert.cpp:10