-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
64 lines (51 loc) · 1.16 KB
/
main.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#define _CRT_SECURE_NO_WARNINGS
// memory leak test.
#ifdef _DEBUG
#include <vld.h>
#endif
// Array idx chk test.
//#define ARRAYS_DEBUG
//#define USE_FAST_LOAD_DATA // no use?
#include <wiz/ClauText.h>
int main(int argc, char* argv[])
{
srand(time(nullptr)); //
std::string fileName;
if (argc == 1) {
std::cout << "FileName: ";
std::getline(std::cin, fileName);
}
else
{
fileName = std::string(argv[1]);
}
wiz::load_data::UserType global;
try {
wiz::load_data::LoadData::LoadDataFromFile(fileName, global);
std::cout << "fileName is " << fileName << std::endl;
std::cout << "excute result is " << excute_module("", &global, ExcuteData(), 0) << std::endl;
}
catch (const char* str) {
std::cout << str << std::endl;
GETCH();
}
catch (const std::string& str) {
std::cout << str << std::endl;
GETCH();
}
catch (const wiz::Error& e) {
std::cout << e << std::endl;
GETCH();
}
catch (std::exception e) {
std::cout << e.what() << std::endl;
GETCH();
}
#ifndef _DEBUG
// catch (...) {
// std::cout << "UnKnown Error.." << std::endl;
// GETCH();
// }
#endif
return 0;
}