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