Joedb
9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
src
joedb
ui
main_exception_catcher.cpp
Go to the documentation of this file.
1
#include "
joedb/ui/main_exception_catcher.h
"
2
3
#include <iostream>
4
5
namespace
joedb
6
{
7
/// Catch exception from main
8
///
9
/// This function is particularly necessary in Windows, because no
10
/// exception information is printed by default there.
11
int
main_exception_catcher
12
(
13
int
(*
main
)(
int
,
char
**),
int
argc,
char
**argv
14
)
15
{
16
try
17
{
18
return
main
(argc, argv);
19
}
20
catch
(
const
std::exception &e)
21
{
22
std::cerr <<
"Exception caught: "
<< e.what() <<
'\n'
;
23
return
1;
24
}
25
}
26
}
main
int main()
Definition
concurrency_tutorial.cpp:6
joedb::main_exception_catcher
int main_exception_catcher(int(*main)(int, char **), int argc, char **argv)
Catch exception from main.
Definition
main_exception_catcher.cpp:12
main_exception_catcher.h
joedb
Definition
Blob.h:7
Generated by
1.9.8