1#include <Common/Config/ConfigProcessor.h>
2#include <iostream>
3
4int main(int argc, char ** argv)
5{
6 try
7 {
8 if (argc != 2)
9 {
10 std::cerr << "usage: " << argv[0] << " path" << std::endl;
11 return 3;
12 }
13
14 DB::ConfigProcessor processor(argv[1], false, true);
15 DB::XMLDocumentPtr document = processor.processConfig();
16 Poco::XML::DOMWriter().writeNode(std::cout, document);
17 }
18 catch (Poco::Exception & e)
19 {
20 std::cerr << "Exception: " << e.displayText() << std::endl;
21 return 1;
22 }
23 catch (std::exception & e)
24 {
25 std::cerr << "std::exception: " << e.what() << std::endl;
26 return 3;
27 }
28 catch (...)
29 {
30 std::cerr << "Some exception" << std::endl;
31 return 2;
32 }
33
34 return 0;
35}
36