GlobalObjects
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EuException.h
Go to the documentation of this file.
1#ifndef INC_EUEXCEPTION_H
2#define INC_EUEXCEPTION_H
3//-----------------------------------------------------------------------------
68//-----------------------------------------------------------------------------
69#include "EuToolTypes.h"
70#include <stdexcept>
71//-----------------------------------------------------------------------------
72namespace eut
73{
74 //---------------------------------------------------------------------------
89 class ErrorNException : public std::runtime_error
90 {
91 private:
92 //============== Attribute
93 //-----------------------------------------------------------------------
104 //-----------------------------------------------------------------------
114 char const * m_FileName;
115 //-----------------------------------------------------------------------
126 //-----------------------------------------------------------------------
127
128 public:
129 //============== De- & Konstruktoren
130 //-----------------------------------------------------------------------
148 inline ErrorNException( const std::string & _Message, int iError, char const * chFileName, int iLine );
149 //-----------------------------------------------------------------------
167 inline ErrorNException( const char *_Message, int iError, char const * chFileName, int iLine );
168 //-----------------------------------------------------------------------
180 inline ErrorNException( const ErrorNException & rT );
181 //-----------------------------------------------------------------------
182
183 //============== Methoden
184 //-----------------------------------------------------------------------
196 inline int error() const;
197 //-----------------------------------------------------------------------
209 inline char const * fileName() const;
210 //-----------------------------------------------------------------------
222 inline int lineNumber() const;
223 //-----------------------------------------------------------------------
224
225 //-----------------------------------------------------------------------
237 inline ErrorNException & operator= ( const ErrorNException & rT );
238 //-----------------------------------------------------------------------
239 };
240
241 //---------------------------------------------------------------------------
242 #ifdef _MSC_VER
243 /* warning C4189: "t_iDEBUG_XXX": Lokale Variable ist initialisiert aber nicht referenziert */
244 #pragma warning( disable : 4189 )
245 #endif
246 //---------------------------------------------------------------------------
247 #if defined(__GNUC__)
248 /* Warnung: unused variable 't_iDEBUG_XXX' [-Wunused-variable] */
249 #pragma GCC diagnostic push
250 #pragma GCC diagnostic ignored "-Wunused-variable"
251 #endif
252 //---------------------------------------------------------------------------
253 inline ErrorNException::ErrorNException( const std::string& _Message, int iError, char const * chFileName, int iLine )
254 : std::runtime_error( _Message ),
255 m_iError( iError ),
256 m_FileName( chFileName ),
257 m_iLineNumber( iLine )
258 {
259 #ifdef _DEBUG
260 int t_iDEBUG_BreakPoint = 1;
261 #endif
262 }
263 //---------------------------------------------------------------------------
264 inline ErrorNException::ErrorNException( const char *_Message, int iError, char const * chFileName, int iLine )
265 : std::runtime_error( _Message ),
266 m_iError( iError ),
267 m_FileName( chFileName ),
268 m_iLineNumber( iLine )
269 {
270 #ifdef _DEBUG
271 int t_iDEBUG_BreakPoint = 1;
272 #endif
273 }
274 //---------------------------------------------------------------------------
275 #ifdef _MSC_VER
276 /* warning C4189: "t_iDEBUG_XXX": Lokale Variable ist initialisiert aber nicht referenziert */
277 #pragma warning( default : 4189 )
278 #endif
279 //---------------------------------------------------------------------------
280 #if defined(__GNUC__)
281 /* Warnung: unused variable 't_iDEBUG_XXX' [-Wunused-variable] */
282 #pragma GCC diagnostic pop
283 #endif
284 //---------------------------------------------------------------------------
286 : std::runtime_error( rT ),
287 m_iError( rT.m_iError ),
290 {
291 }
292 //---------------------------------------------------------------------------
293 inline int ErrorNException::error() const
294 {
295 return m_iError;
296 }
297 //---------------------------------------------------------------------------
298 inline char const * ErrorNException::fileName() const
299 {
300 return m_FileName;
301 }
302 //---------------------------------------------------------------------------
304 {
305 return m_iLineNumber;
306 }
307 //---------------------------------------------------------------------------
309 {
310 if( this != & rT )
311 {
312 m_iError = rT.m_iError;
315 std::runtime_error::operator=( rT );
316 }
317 return *this;
318 }
319 //---------------------------------------------------------------------------
320} // namespace eut
321#endif
For each library, here 'EuTools' there is a type file.
char const * fileName() const
Definition EuException.h:298
char const * m_FileName
Definition EuException.h:114
int m_iLineNumber
Definition EuException.h:125
int error() const
Definition EuException.h:293
ErrorNException & operator=(const ErrorNException &rT)
Definition EuException.h:308
int lineNumber() const
Definition EuException.h:303
int m_iError
Definition EuException.h:103
ErrorNException(const std::string &_Message, int iError, char const *chFileName, int iLine)
Definition EuException.h:253
Definition IniFile.h:79