Debian Codegraph @

src/FDM/UIUCModel/uiuc_warnings_errors.cpp

raw symbols SCIP
1 /**********************************************************************
2
3 FILENAME: uiuc_warnings_errors.cpp
4
5 ----------------------------------------------------------------------
6
7 DESCRIPTION:
8
9 Prints to screen the follow:
10
11 - Error Code (errorCode)
12
13 - Message indicating the problem. This message should be preceded by
14 "Warning", "Error" or "Note". Warnings are non-fatal and the code
15 will pause. Errors are fatal and will stop the code. Notes are
16 only for information.
17
18
19 ----------------------------------------------------------------------
20
21 STATUS: alpha version
22
23 ----------------------------------------------------------------------
24
25 REFERENCES: based on "menu reader" format of Michael Selig
26
27 ----------------------------------------------------------------------
28
29 HISTORY: 01/29/2000 initial release
30
31 ----------------------------------------------------------------------
32
33 AUTHOR(S): Bipin Sehgal <[email protected]>
34 Jeff Scott <[email protected]>
35 Michael Selig <[email protected]>
36
37 ----------------------------------------------------------------------
38
39 VARIABLES:
40
41 ----------------------------------------------------------------------
42
43 INPUTS: -error code
44 -input line
45
46 ----------------------------------------------------------------------
47
48 OUTPUTS: -warning/error message to screen
49
50 ----------------------------------------------------------------------
51
52 CALLED BY: uiuc_menu.cpp
53
54 ----------------------------------------------------------------------
55
56 CALLS TO: none
57
58 ----------------------------------------------------------------------
59
60 COPYRIGHT: (C) 2000 by Michael Selig
61
62 This program is free software; you can redistribute it and/or
63 modify it under the terms of the GNU General Public License
64 as published by the Free Software Foundation.
65
66 This program is distributed in the hope that it will be useful,
67 but WITHOUT ANY WARRANTY; without even the implied warranty of
68 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69 GNU General Public License for more details.
70
71 You should have received a copy of the GNU General Public License
72 along with this program; if not, write to the Free Software
73 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
74
75 **********************************************************************/
76
77 #include <iostream>
78
79 #include "uiuc_warnings_errors.h"
80
81 using std::cerr;
82 using std::endl;
83
84 #ifndef _MSC_VER
85 using std::exit;
86 #endif
87
88 void uiuc_warnings_errors(int errorCode, std::string line)
89 {
90 switch (errorCode)
91 {
92 case 1:
93 cerr << "UIUC ERROR 1: The value of the coefficient in \"" << line << "\" should be of type float" << endl;
94 exit(-1);
95 break;
96 case 2:
97 cerr << "UIUC ERROR 2: Unknown identifier in \"" << line << "\" (check uiuc_map_*.cpp)" << endl;
98 exit(-1);
99 break;
100 case 3:
101 cerr << "UIUC ERROR 3: Slipstream effects only work w/ the engine simpleSingleModel line: \"" << line << endl;
102 exit(-1);
103 break;
104 case 4:
105 cerr << "UIUC ERROR 4: Downwash mode does not exist: \"" << line << endl;
106 exit(-1);
107 break;
108 case 5:
109 cerr << "UIUC ERROR 5: Must use dyn_on_speed not equal to zero: \"" << line << endl;
110 exit(-1);
111 break;
112 case 6:
113 cerr << "UIUC ERROR 6: Table lookup data exceeds 99 point limit: \"" << endl;
114 exit(-1);
115 break;
116 case 7:
117 cerr << "UIUC ERROR 7: Need to download data file for the ornithopter. Go to http://www.aae.uiuc.edu/m-selig/apasim/Aircraft-uiuc.html " << endl;
118 exit(-1);
119 break;
120 }
121
122 cerr << "UIUC UNKNOWN ERROR" << endl;
123 exit(-1);
124 }
125
126 // end uiuc_warnings_errors.cpp