2929#define MXCPP_EXCEPTION_HPP_INCLUDE_GUARD
3030
3131
32- #ifndef __cplusplus
33- #error This header file requires C++ to compile!
34- #endif
35-
32+ #include " mx/sysdefs.hpp"
3633
37- #include " mx/sysdefs.h"
38-
39- #include " mx/types.h"
34+ #include " mx/types.hpp"
4035
4136#include " mx/Class.hpp"
4237
@@ -45,38 +40,14 @@ namespace mx
4540{
4641
4742
48- #define mxThrow (exception ) \
49- mx:: ThrowException (exception, __FILE__, static_cast < Size >(__LINE__))
43+ #define Throw (exception ) \
44+ ThrowException (exception, __FILE__, static_cast < FileLine >(__LINE__))
5045
5146
5247// Forward declaration.
5348class Stream ;
5449
5550
56- #ifdef MXCPP_FIX_NO_STD_EXCEPTION
57-
58- // For compilers which does not have std::exception classes declared.
59- namespace std
60- {
61-
62- class exception
63- {
64- /*
65- public:
66- */
67- };
68-
69-
70- class bad_alloc
71- : public exception
72- {};
73-
74-
75- }
76-
77- #endif // MXCPP_FIX_NO_STD_EXCEPTION
78-
79-
8051/* *
8152 Exception class declaration.
8253
@@ -234,7 +205,7 @@ class MXCPP_DLL_EXPORT Exception
234205
235206 MX_INLINE void SetDebugInfo (
236207 const char * const sFileName ,
237- const Size iFileLine) const ;
208+ const FileLine iFileLine) const ;
238209
239210protected:
240211
@@ -254,7 +225,7 @@ class MXCPP_DLL_EXPORT Exception
254225 mutable const char * m_sFileName;
255226
256227 // / Line number in the source file, where the exception was raised.
257- mutable Size m_iFileLine;
228+ mutable FileLine m_iFileLine;
258229
259230
260231}; // class Exception
@@ -307,7 +278,7 @@ template< class ExceptionType >
307278static MX_NORETURN ThrowException (
308279 const ExceptionType & pException,
309280 const char * const sFileName ,
310- const Size iFileLine)
281+ const FileLine iFileLine)
311282{
312283 // Setup the exception using Exception typed reference, to allow setting
313284 // of its private members.
0 commit comments