1,80c1,62
< #ifndef _FILE_EXCEPTION_H
< #define _FILE_EXCEPTION_H
< 
< //#include <stdexcept>
< #include <string>
< #include <sstream>
< 
< #include "IOException.h"
< #include "FssimApp.h"
< 
< using namespace std;
< 
< class FileException : public IOException
< {
< public:
< 	FileException(const string& what, bool eof = false, const bool isFatal = true)
< 	    : IOException(what, eof, isFatal)
<     {
<         //this->initLineNumberAndFileName();
<         ostringstream message;
<         if (isFatal)
<         {
<             message << "ERROR: ";
<         }
<         else
<         {
<             message << "WARNING: ";
<         }
<          // added in version 4.1
<         //message << m_fileName << " (Line#:" << m_lineNumber << ") \n" << what << "\n";
<         message << what << "\n";
<         if (this->isEndOfFile())
<         {
<             message << "End of file reached";
<         }
<         m_what = message.str();
<     }
< 
< 	virtual ~FileException() throw() { }
< 
<     // override to provide file name, line number, and end of file with message
< 	virtual const char* what() const throw()
< 	{
< 	    return m_what.c_str();
< 	}
< 
< protected:
<     /*
<     void setWhat(const string& what, const string& invalidValue)
<     {
<         ostringstream message;
<         message << "ERROR: " << m_fileName << "(Line#:" << m_lineNumber << ") " << what();
<         if (this->isEndOfFile)
<         {
<             message << "End of file reached";
<         }
<         m_what = message.str();
<     }
<     */
< 
< protected:
<     // added in version 4.1
<     /*
<     void initLineNumberAndFileName()
<     {
< 	    FssimApp* pApp = FssimApp::getApp();
<         assert(0 != pApp);
< 
<         m_lineNumber = pApp->getCurrentLineNumber();
<         m_fileName = pApp->getCurrentInputFileName();
< 	}
< 	*/
< 
< protected:
<     int m_lineNumber;
<     string m_fileName;
<     string m_what;
< };
< 
< #endif
---
> #ifndef _FILE_EXCEPTION_H
> #define _FILE_EXCEPTION_H
> 
> #include <string>
> #include <sstream>
> 
> #include "FssimApp.h"
> 
> #include "IOException.h"
> 
> using namespace std;
> 
> 
> class FileException : public IOException
> {
> public:
> 	FileException(const string& what, bool eof = false, const bool isFatal = true)
> 	    : IOException(what, eof, isFatal)
>     {
>         this->initLineNumberAndFileName();
>         ostringstream message;
>         if (isFatal)
>         {
>             message << "ERROR: ";
>         }
>         else
>         {
>             message << "WARNING: ";
>         }
>         message << m_fileName << " (Line#:" << m_lineNumber << ") \n" << what << "\n";
>         if (this->isEndOfFile())
>         {
>             message << "End of file reached";
>         }
>         m_what = message.str();
>     }
> 
> 	virtual ~FileException() throw() { }
> 
>     // override to provide file name, line number, and end of file with message
> 	virtual const char* what() const throw()
> 	{
> 	    return m_what.c_str();
> 	}
> 
> protected:
>     void initLineNumberAndFileName()
>     {
> 	    FssimApp* pApp = FssimApp::getApp();
>         assert(0 != pApp);
> 
>         m_lineNumber = pApp->getCurrentLineNumber();
>         m_fileName = pApp->getCurrentInputFileName();
> 	}
> 
> protected:
>     int m_lineNumber;
>     string m_fileName;
>     string m_what;
> };
> 
> #endif
