Menu

[r184]: / cms / trunk / main.cpp  Maximize  Restore  History

Download this file

37 lines (30 with data), 600 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <iostream>
#include <memory>
#include "blog.h"
#include <cppcms/thread_pool.h>
#include <cppcms/global_config.h>
#include <cppcms/url.h>
#include <dbi/dbixx.h>
#include <cppcms/templates.h>
using namespace std;
Templates_Set templates;
int main(int argc,char **argv)
{
try{
global_config.load(argc,argv);
templates.load();
Run_Application<Blog>(argc,argv);
cout<<"Exiting\n";
}
catch(HTTP_Error &s) {
cerr<<s.get()<<endl;
return 1;
}
catch(dbixx::dbixx_error &e) {
cerr<<"dbi:"<<e.what()<<endl;
}
catch(std::exception &e) {
cerr<<e.what()<<endl;
}
return 0;
}
MongoDB Logo MongoDB