dxd - dynax driver framework 2.1.0d71
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_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,
... )

◆ 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),\
__std_exception.what(),\
__FILE__, __LINE__,\
##__VA_ARGS__);\
inject\
throw exception;\
}catch(...){\
dx::exception exception(\
DX_STRINGIFY(test),\
__FILE__, __LINE__,\
##__VA_ARGS__);\
inject\
throw exception;\
}
Definition dx_exception.h:134
os_result error
Definition dx_exception.h:137
#define DX_STRINGIFY(x)
Definition dx_macros.h:32
@ unknown
Definition macOS/dx_platform.h:172
#define __PRETTY_FUNCTION__
mock compiler idiosyncrasies
Definition windows/dx_platform.h:47

◆ 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__);}}
::mach_error_t os_result
Definition macOS/dx_platform.h:159
bool os_error(os_result result) noexcept
Definition macOS/dx_platform.h:182

◆ 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 Thu Jun 6 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.