52 #ifndef __PCL_Win32Exception_h
53 #define __PCL_Win32Exception_h
57 #if !defined( __PCL_WINDOWS ) || defined( __PCL_LINUX ) || defined( __PCL_FREEBSD ) || defined( __PCL_MACOSX )
58 # error Win32Exception can only be used on MS Windows platforms.
113 , m_details( details )
154 return "Undefined system exception";
163 ExceptionAddress(), ExceptionCode() ) + Message();
164 if ( !m_details.IsEmpty() )
167 info.Append( m_details );
179 return "PCL Win32 System Exception";
214 class PCL_CLASS Win32AccessViolationException :
public Win32Exception
218 Win32AccessViolationException( exception_code code, exception_data_pointer data,
224 Win32AccessViolationException(
const Win32AccessViolationException& ) =
default;
226 String Message()
const override;
231 #define DECLARE_WIN32_EXCEPTION( className, message ) \
232 class PCL_CLASS className : public pcl::Win32Exception \
235 className( exception_code code, exception_data_pointer data, \
236 const IsoString& details = IsoString() ) : \
237 pcl::Win32Exception( code, data, details ) \
240 className( const className& ) = default; \
241 String Message() const override \
249 DECLARE_WIN32_EXCEPTION( EWin32ArrayBoundsExceeded,
250 "Array bounds exceeded" );
252 DECLARE_WIN32_EXCEPTION( EWin32Breakpoint,
253 "A breakpoint was encountered" );
255 DECLARE_WIN32_EXCEPTION( EWin32DataMisalignment,
256 "Invalid read/write operation on misaligned data" );
258 DECLARE_WIN32_EXCEPTION( EWin32FloatingPointDenormalOperand,
259 "Denormal operand in floating-point operation" );
261 DECLARE_WIN32_EXCEPTION( EWin32FloatingPointDivideByZero,
262 "Division by zero in floating-point operation" );
264 DECLARE_WIN32_EXCEPTION( EWin32FloatingPointInexactResult,
265 "Inexact result in floating-point operation" );
267 DECLARE_WIN32_EXCEPTION( EWin32FloatingPointInvalidOperation,
268 "Invalid floating-point operation" );
270 DECLARE_WIN32_EXCEPTION( EWin32FloatingPointOverflow,
271 "Overflow in floating-point operation" );
273 DECLARE_WIN32_EXCEPTION( EWin32FloatingPointStackCheck,
274 "Stack limits exceeded in floating-point operation" );
276 DECLARE_WIN32_EXCEPTION( EWin32FloatingPointUnderflow,
277 "Underflow in floating-point operation" );
279 DECLARE_WIN32_EXCEPTION( EWin32IllegalInstruction,
280 "Illegal processor instruction" );
282 DECLARE_WIN32_EXCEPTION( EWin32PageError,
283 "Memory page not found" );
285 DECLARE_WIN32_EXCEPTION( EWin32DivideByZero,
286 "Integer division by zero" );
288 DECLARE_WIN32_EXCEPTION( EWin32Overflow,
289 "Integer overflow" );
291 DECLARE_WIN32_EXCEPTION( EWin32InvalidDisposition,
292 "Invalid exception disposition" );
294 DECLARE_WIN32_EXCEPTION( EWin32NonContinuableException,
295 "Noncontinuable exception " );
297 DECLARE_WIN32_EXCEPTION( EWin32PrivilegedInstruction,
298 "Privileged processor instruction" );
300 DECLARE_WIN32_EXCEPTION( EWin32SingleStep,
301 "Single-instruction step" );
303 DECLARE_WIN32_EXCEPTION( EWin32StackOverflow,
308 #undef DECLARE_WIN32_EXCEPTION
Root base class for all PCL exception classes.
Eight-bit string (ISO/IEC-8859-1 or UTF-8 string)
String & Format(const_c_string8 fmt,...)
A Win32 structured exception handler that throws C++ exceptions.
String FormatInfo() const override
Win32Exception(exception_code code, exception_data_pointer data, const IsoString &details=IsoString())
const void * exception_data_pointer
const IsoString & Details() const
String Caption() const override
String Message() const override
void Show() const override
exception_code ExceptionCode() const
Win32Exception(const Win32Exception &)=default
exception_address ExceptionAddress() const
const void * exception_address