Autoarr2 works now
This commit is contained in:
@@ -9,10 +9,6 @@ extern "C" {
|
||||
#include "errors.h"
|
||||
#include "cptr.h"
|
||||
|
||||
#if __cplusplus
|
||||
#include "errors.hpp"
|
||||
#endif
|
||||
|
||||
// executes codeblock and prints execution time
|
||||
#ifdef CLOCK_REALTIME // non-standard high-precision clock
|
||||
#define optime(opname,repeats,codeblock) ({\
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "errors.hpp"
|
||||
|
||||
void throwcpp_id(ErrorId eid){
|
||||
throwcpp_msg(errname(eid));
|
||||
}
|
||||
|
||||
void throwcpp_msg(char* emsg){
|
||||
__EXIT(emsg);
|
||||
}
|
||||
@@ -24,7 +24,7 @@ typedef struct Maybe{
|
||||
|
||||
// return it if func doesn't return anything
|
||||
// .value .errmsg
|
||||
static const Maybe MaybeNull={UniNull, NULL};
|
||||
#define MaybeNull (Maybe){UniNull, NULL}
|
||||
|
||||
void Maybe_free(Maybe e);
|
||||
void printMaybe(Maybe e);
|
||||
@@ -46,6 +46,10 @@ char* __unknownErr( );
|
||||
default: __unknownErr\
|
||||
)(E)
|
||||
|
||||
#if __cplusplus
|
||||
#define throw_id(E) __EXIT(((char*)__genErrMsg(errname(E), __FILE__,__LINE__,__func__)))
|
||||
#define throw_msg(E) __EXIT(((char*)__genErrMsg(E, __FILE__,__LINE__,__func__)))
|
||||
#endif
|
||||
#define throw(E) __EXIT(((char*)__genErrMsg((__stringify_err(E)), __FILE__,__LINE__,__func__)))
|
||||
#define safethrow(E, FREEMEM) { FREEMEM; __RETURN_EXCEPTION(((char*)__genErrMsg((__stringify_err(E)), __FILE__,__LINE__,__func__))); }
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include "errors.h"
|
||||
|
||||
void throwcpp_id(ErrorId eid);
|
||||
void throwcpp_msg(char* emsg);
|
||||
#endif
|
||||
Reference in New Issue
Block a user