]> git.mxchange.org Git - flightgear.git/blob - src/FDM/UIUCModel/uiuc_warnings_errors.cpp
MacOS changes contributed by Darrell Walisser (12/13/2000)
[flightgear.git] / src / FDM / UIUCModel / uiuc_warnings_errors.cpp
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 only
16 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       <bsehgal@uiuc.edu>
34                Jeff Scott         <jscott@mail.com>
35                Michael Selig      <m-selig@uiuc.edu>
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
74  USA or view http://www.gnu.org/copyleft/gpl.html.
75
76 **********************************************************************/
77 #include <stdlib.h>
78
79 #include "uiuc_warnings_errors.h"
80
81 FG_USING_STD (cerr);
82 FG_USING_STD (endl);
83 FG_USING_STD (exit);
84
85 void uiuc_warnings_errors(int errorCode, string line)
86 {
87   switch (errorCode)
88     {
89     case 1:
90         cerr << "UIUC ERROR: The value of the coefficient in \"" << line << "\" should be of type float" << endl;
91         exit(-1);
92         break;
93     case 2:
94         cerr << "UIUC ERROR: Unknown identifier in \"" << line << "\"" << endl;
95         exit(-1);
96         break;
97     }
98 }
99
100 // end uiuc_warnings_errors.cpp