28 void Open(
const char* filename);
This class implements a dynamic vector of double values.
Definition: doublevector.h:11
This is the class used to handle errors in the model, by displaying error messages to the user and lo...
Definition: errorhandler.h:14
StrStack * files
This is the StrStack of the names of files that are currently open to read from.
Definition: errorhandler.h:184
void setLogLevel(int level)
This function will set the level of logging information used for the current model run.
Definition: errorhandler.cc:22
void logMessageNaN(LogLevel mlevel, const char *msg)
This function will log a warning message about a NaN found in the model.
Definition: errorhandler.cc:407
void Close()
This function will close the last file opened for reading data from.
Definition: errorhandler.cc:75
void setRunOptimise(int opt)
This function will set the optimise flag for the current model run.
Definition: errorhandler.h:151
void setNaNFlag(int flag)
This function will return the flag denoting whether a NaN error has been rasied or not.
Definition: errorhandler.h:175
ofstream logfile
This ofstream is the file that all the logging information will get sent to.
Definition: errorhandler.h:175
void logFileEOFMessage(LogLevel mlevel)
This function will log an EOF warning message generated when reading information from file.
Definition: errorhandler.cc:666
int checkLogFile()
This function will return the flag used to determine whether ta logfile exists.
Definition: errorhandler.h:48
int getRunOptimise() const
This function will return the optimise flag for the current model run.
Definition: errorhandler.h:156
void logMessage(LogLevel mlevel, const char *msg)
This function will log a warning message.
Definition: errorhandler.cc:84
void checkIfFailure(ios &infile, const char *text)
This function will check to see if an iostream can be opened, and exit Gadget with exit(EXIT_FAILURE)...
Definition: errorhandler.cc:753
void logFileUnexpected(LogLevel mlevel, const char *msg1, const char *msg2)
This function will log an 'unexpected' warning message generated when reading information from file.
Definition: errorhandler.cc:707
~ErrorHandler()
This is the default ErrorHandler destructor.
Definition: errorhandler.cc:18
void Open(const char *filename)
This function will open a file for reading data from, and store the name of the file.
Definition: errorhandler.cc:70
ErrorHandler()
This is the ErrorHandler constructor.
Definition: errorhandler.cc:9
void setLogFile(const char *filename)
This function will open the file that the logging information will be written to.
Definition: errorhandler.cc:59
void logFinish()
This function will log information about the finish of the current model run to std::cout and a log f...
Definition: errorhandler.cc:768
int getNaNFlag() const
This function will return the flag denoting whether a NaN error has been rasied or not.
Definition: errorhandler.h:171
LogLevel getLogLevel() const
This function will return the level of logging information used for the current model run.
Definition: errorhandler.h:166
void logFileMessage(LogLevel mlevel, const char *msg)
This function will log a warning message generated when reading information from file.
Definition: errorhandler.cc:453
This class implements a simple stack of string objects.
Definition: strstack.h:10
LogLevel
Definition: errorhandler.h:8
@ LOGFAIL
Definition: errorhandler.h:8
@ LOGNONE
Definition: errorhandler.h:8
@ LOGWARN
Definition: errorhandler.h:8
@ LOGDETAIL
Definition: errorhandler.h:8
@ LOGINFO
Definition: errorhandler.h:8
@ LOGDEBUG
Definition: errorhandler.h:8
@ LOGMESSAGE
Definition: errorhandler.h:8