dxd - dynax driver framework 2.2.0d81
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
 
namespace  dx::thread
 thread
 
namespace  dx::trace
 

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_handler_or_rethrow(object, test, inject, ...)    dx_catchall_rethrow(inject if(test) (object)->exception(exception); else, ##__VA_ARGS__)\
 
#define dx_catchall_rethrow(inject, ...)
 
#define dx_pass(test, ...)
 
#define dx_pass_strict(test, ...)
 

Functions

void dx::halt ()
 
std::string dx::thread::name ()
 
std::ostream & dx::operator<< (std::ostream &os, const exception &exception) noexcept
 
std::string dx::trace::pretty (std::string function) noexcept
 
void dx::trace::unfold (std::ostream &os, const exception &exception, unsigned int indent=0) noexcept
 

Variables

std::recursive_mutex dx::io_mutex
 

Macro Definition Documentation

◆ __dx_catchall

#define __dx_catchall ( inject,
... )
Value:
catch(const dx::exception& __dx_exception){\
try{\
dx::exception exception(\
&__dx_exception,\
__dx_exception.error,\
__FILE__, __LINE__,\
##__VA_ARGS__);\
inject\
}catch(...){}\
}catch(const std::exception& __std_exception){\
try{\
dx::exception exception(\
__std_exception.what(),\
__FILE__, __LINE__,\
##__VA_ARGS__);\
inject\
}catch(...){}\
}catch(...){\
try{\
dx::exception exception(\
__FILE__, __LINE__,\
##__VA_ARGS__);\
inject\
}catch(...){}\
}
Definition dx_exception.h:133
os_result error
Definition dx_exception.h:136
@ unknown
Definition macOS/dx_platform.h:173
#define __PRETTY_FUNCTION__
mock compiler idiosyncrasies
Definition windows/dx_platform.h:47

◆ 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_handler_or_rethrow

#define dx_catchall_handler_or_rethrow ( object,
test,
inject,
... )    dx_catchall_rethrow(inject if(test) (object)->exception(exception); else, ##__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(\
__std_exception.what(),\
__FILE__, __LINE__,\
##__VA_ARGS__);\
inject\
throw exception;\
}catch(...){\
dx::exception exception(\
__FILE__, __LINE__,\
##__VA_ARGS__);\
inject\
throw exception;\
}

◆ 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__);}}
#define DX_STRINGIFY(x)
Definition dx_macros.h:32
::mach_error_t os_result
Definition macOS/dx_platform.h:160
bool os_error(os_result result) noexcept
Definition macOS/dx_platform.h:183

◆ 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 Dec 20 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.