-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathextracter.cpp
46 lines (40 loc) · 981 Bytes
/
extracter.cpp
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
37
38
39
40
41
42
43
44
45
46
/*
* Copyright 2007 by IDIAP Research Institute
* http://www.idiap.ch
*
* See the file COPYING for the licence associated with this software.
*/
#include <stdio.h>
#include "tracter/Extract.h"
#include "tracter/FPE.h"
using namespace Tracter;
/**
* Extracter executable.
*/
int main(int argc, char** argv)
{
/*
* It's debatable whether it's even worth catching these
* exceptions. If not caught, the same error messages appear via
* the terminate call. An example of how to do it perhaps?
*/
try
{
/* Instantiate a factory and an extractor */
ASRFactory factory;
Extract extract(argc, argv, &factory);
/* And run it */
extract.All();
}
catch(std::exception& e)
{
fprintf(stderr, "Caught exception: %s\n", e.what());
return 1;
}
catch(...)
{
fprintf(stderr, "Caught unknown exception\n");
return 1;
}
return 0;
}