IniFile
Lade ...
Suche ...
Keine Treffer
EuException.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_EUEXCEPTION_H
2#define INC_EUEXCEPTION_H
3//-----------------------------------------------------------------------------
68//-----------------------------------------------------------------------------
69#include "EuToolTypes.h"
70#include <stdexcept>
71//-----------------------------------------------------------------------------
72namespace eut
73{
74 //---------------------------------------------------------------------------
99 class ErrorNException : public std::runtime_error
100 {
101 private:
102 //============== Attribute
103 //-----------------------------------------------------------------------
114 //-----------------------------------------------------------------------
124 char const * m_FileName;
125 //-----------------------------------------------------------------------
136 //-----------------------------------------------------------------------
137
138 public:
139 //============== De- & Konstruktoren
140 //-----------------------------------------------------------------------
158 inline ErrorNException( const std::string & _Message, int iError, char const * chFileName, int iLine );
159 //-----------------------------------------------------------------------
177 inline ErrorNException( const char *_Message, int iError, char const * chFileName, int iLine );
178 //-----------------------------------------------------------------------
190 inline ErrorNException( const ErrorNException & rT );
191 //-----------------------------------------------------------------------
192
193 //============== Methoden
194 //-----------------------------------------------------------------------
206 inline int error() const;
207 //-----------------------------------------------------------------------
219 inline char const * fileName() const;
220 //-----------------------------------------------------------------------
232 inline int lineNumber() const;
233 //-----------------------------------------------------------------------
234
235 //-----------------------------------------------------------------------
247 inline ErrorNException & operator= ( const ErrorNException & rT );
248 //-----------------------------------------------------------------------
249 };
250
251 //---------------------------------------------------------------------------
252 #ifdef _MSC_VER
253 /* warning C4189: "t_iDEBUG_XXX": Lokale Variable ist initialisiert aber nicht referenziert */
254 #pragma warning( disable : 4189 )
255 #endif
256 //---------------------------------------------------------------------------
257 #if defined(__GNUC__)
258 /* Warnung: unused variable 't_iDEBUG_XXX' [-Wunused-variable] */
259 #pragma GCC diagnostic push
260 #pragma GCC diagnostic ignored "-Wunused-variable"
261 #endif
262 //---------------------------------------------------------------------------
263 inline ErrorNException::ErrorNException( const std::string& _Message, int iError, char const * chFileName, int iLine )
264 : std::runtime_error( _Message ),
265 m_iError( iError ),
266 m_FileName( chFileName ),
267 m_iLineNumber( iLine )
268 {
269 #ifdef _DEBUG
270 int t_iDEBUG_BreakPoint = 1;
271 #endif
272 }
273 //---------------------------------------------------------------------------
274 inline ErrorNException::ErrorNException( const char *_Message, int iError, char const * chFileName, int iLine )
275 : std::runtime_error( _Message ),
276 m_iError( iError ),
277 m_FileName( chFileName ),
278 m_iLineNumber( iLine )
279 {
280 #ifdef _DEBUG
281 int t_iDEBUG_BreakPoint = 1;
282 #endif
283 }
284 //---------------------------------------------------------------------------
285 #ifdef _MSC_VER
286 /* warning C4189: "t_iDEBUG_XXX": Lokale Variable ist initialisiert aber nicht referenziert */
287 #pragma warning( default : 4189 )
288 #endif
289 //---------------------------------------------------------------------------
290 #if defined(__GNUC__)
291 /* Warnung: unused variable 't_iDEBUG_XXX' [-Wunused-variable] */
292 #pragma GCC diagnostic pop
293 #endif
294 //---------------------------------------------------------------------------
296 : std::runtime_error( rT ),
297 m_iError( rT.m_iError ),
300 {
301 }
302 //---------------------------------------------------------------------------
303 inline int ErrorNException::error() const
304 {
305 return m_iError;
306 }
307 //---------------------------------------------------------------------------
308 inline char const * ErrorNException::fileName() const
309 {
310 return m_FileName;
311 }
312 //---------------------------------------------------------------------------
314 {
315 return m_iLineNumber;
316 }
317 //---------------------------------------------------------------------------
319 {
320 if( this != & rT )
321 {
322 m_iError = rT.m_iError;
325 std::runtime_error::operator=( rT );
326 }
327 return *this;
328 }
329 //---------------------------------------------------------------------------
330} // namespace eut
331#endif
char const * fileName() const
Definition EuException.h:308
char const * m_FileName
Definition EuException.h:124
int m_iLineNumber
Definition EuException.h:135
int error() const
Definition EuException.h:303
ErrorNException & operator=(const ErrorNException &rT)
Definition EuException.h:318
int lineNumber() const
Definition EuException.h:313
int m_iError
Definition EuException.h:113
ErrorNException(const std::string &_Message, int iError, char const *chFileName, int iLine)
Definition EuException.h:263
Definition EuBlob.h:75