Skip to content
Snippets Groups Projects

Feature/amalgamated

Closed Stephan Schulz requested to merge feature/amalgamated into refactor
3 files
+ 38
2
Compare changes
  • Side-by-side
  • Inline

Files

+ 2
1
@@ -55,10 +55,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -55,10 +55,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Error reporting without exceptions
// Error reporting without exceptions
#define ALL_NOTHROW
#define ALL_NOTHROW
static int ALL_errno;
static int ALL_errno;
 
static const char* ALL_errdesc;
#ifdef ALL_NOTHROW
#ifdef ALL_NOTHROW
// also needs to set errno (ALL_errno = e.errno, but how to set e.errno in the exception classes?)
// also needs to set errno (ALL_errno = e.errno, but how to set e.errno in the exception classes?)
#define ALL_throw(e) std::cerr << e.what() << std::endl, ALL_errno = 1;
#define ALL_throw(e) std::cerr << "ERR: " << e.what() << std::endl, ALL_errno = 1, ALL_errdesc = e.what();
#define ALL_try // set errno to 0
#define ALL_try // set errno to 0
#define ALL_catch(...) // errno != 0 (will always catch all exceptions though
#define ALL_catch(...) // errno != 0 (will always catch all exceptions though
Loading