dxd - dynax driver framework 2.1.0d48
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx_exception.h File Reference
#include "dx_platform.h"
#include <stdexcept>
#include <iomanip>
#include <chrono>
#include <mutex>
+ Include dependency graph for dx_exception.h:
+ This graph shows which files directly or indirectly include this file:

Classes

class  dx::exception
 

Namespaces

namespace  dx
 dynax driver framework user mode interface namespace
 

Macros

#define __dx_catchall(inject, ...)
 
#define dx_catchall(inject, ...)   __dx_catchall(inject std::cerr<< exception<< std::endl;, ##__VA_ARGS__)
 
#define dx_catchall_handler(object, inject, ...)   __dx_catchall(inject object->exception(exception);, ##__VA_ARGS__)
 
#define dx_catchall_rethrow(inject, ...)
 
#define dx_pass(test, ...)
 
#define dx_pass_strict(test, ...)
 

Functions

void dx::halt ()
 
std::ostream & dx::operator<< (std::ostream &os, const exception &exception)
 
void dx::trace (std::ostream &os, const exception &exception, unsigned int indent=0)
 

Variables

std::recursive_mutex dx::io_mutex
 

Macro Definition Documentation

◆ __dx_catchall

#define __dx_catchall ( inject,
... )

◆ dx_catchall

#define dx_catchall ( inject,
... )   __dx_catchall(inject std::cerr<< exception<< std::endl;, ##__VA_ARGS__)

◆ dx_catchall_handler

#define dx_catchall_handler ( object,
inject,
... )   __dx_catchall(inject object->exception(exception);, ##__VA_ARGS__)

◆ dx_catchall_rethrow

#define dx_catchall_rethrow ( inject,
... )
Value:
catch(const dx::exception& __dx_exception){\
dx::exception exception(\
&__dx_exception,\
__dx_exception.error,\
__FILE__, __LINE__,\
##__VA_ARGS__);\
inject\
throw exception;\
}catch(const std::exception& __std_exception){\
dx::exception exception(\
DX_STRINGIFY(test),\
dx::unknown,\
__std_exception.what(),\
__FILE__, __LINE__,\
##__VA_ARGS__);\
inject\
throw exception;\
}catch(...){\
dx::exception exception(\
DX_STRINGIFY(test),\
dx::unknown,\
__FILE__, __LINE__,\
##__VA_ARGS__);\
inject\
throw exception;\
}
Definition dx_exception.h:132
os_result error
Definition dx_exception.h:135
#define DX_STRINGIFY(x)
Definition dx_macros.h:32
#define __PRETTY_FUNCTION__
mock compiler idiosyncrasies
Definition windows/dx_platform.h:46

◆ dx_pass

#define dx_pass ( test,
... )
Value:
{\
dx::os_result __dx_test_status=(test);\
if (dx::os_error(__dx_test_status)){\
dx::halt();\
throw dx::exception(\
DX_STRINGIFY(test),\
__dx_test_status,\
__FILE__, __LINE__,\
##__VA_ARGS__);}}

◆ dx_pass_strict

#define dx_pass_strict ( test,
... )
Value:
{\
dx::os_result __dx_test_status=(test);\
if (__dx_test_status){\
dx::halt();\
throw dx::exception(\
DX_STRINGIFY(test),\
__dx_test_status,\
__FILE__, __LINE__,\
##__VA_ARGS__);}}

(c) copyright 2009 dynamic acoustics e.U. generated on Fri Feb 23 2024

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.