46 #define CHECK_ERROR_DROP
47 #if defined(DEVEL_RALF)
52 #if defined(CHECK_ERROR_DROP)
57 #if defined(EXTRA_ERROR_INFO)
60 #endif // EXTRA_ERROR_INFO
62 ARB_undropable_error(
GB_ERROR gberr_) : gberr(gberr_), delivered(
false)
63 #
if defined(EXTRA_ERROR_INFO)
64 , file(__FILE__), line(__LINE__)
67 ~ARB_undropable_error() {
80 GB_ERROR look()
const {
return gberr; }
95 #endif // CHECK_ERROR_DROP
102 #if defined(CHECK_ERROR_DROP)
104 GB_ERROR look()
const {
return error->look(); }
106 explicit ARB_ERROR() : error(
new ARB_undropable_error(
NULp)) {}
112 GB_ERROR look()
const {
return error; }
118 #endif // CHECK_ERROR_DROP
122 bool occurred()
const {
return look(); }
127 if (error != err.error) *
this = err.
deliver();
131 operator bool()
const {
return occurred(); }
147 printf(
"ARB_ERROR='%s'\n", look());
155 const char *why_invalid;
159 : why_invalid(valid ?
NULp : why_invalid_)
163 #if defined(ASSERTION_USED)
166 why_invalid = other.why_invalid;
170 operator bool()
const {
return !why_invalid; }
171 const char *
why_not()
const {
return why_invalid; }
174 #if defined(ASSERTION_USED)
176 fprintf(stderr,
"Invalid: %s\n", why_invalid);
184 #error arb_error.h included twice
185 #endif // ARB_ERROR_H
ARB_ERROR(const ARB_ERROR &err)
GB_ERROR preserve() const
const char * why_not() const
Validity(const Validity &other)
Validity(bool valid, const char *why_invalid_)
Validity & operator=(const Validity &other)
void expect_no_error() const
GB_write_int const char GB_write_autoconv_string WRITE_SKELETON(write_pointer, GBDATA *,"%p", GB_write_pointer) char *AW_awa if)(!gb_var) return strdup("")
ARB_ERROR & operator=(GB_ERROR gberr)
CONSTEXPR_INLINE bool valid(SpeciesCreationMode m)
ARB_ERROR(GB_ERROR gberr)
void assert_is_valid() const