aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-13 11:42:58 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-13 11:42:58 -0800
commit6def61dfe982fe508ba19dd35aca0013079b4bff (patch)
tree9c6c8a23f5cc9ff3bf6ab50ccf5de89c4f7d5de1 /parser.h
parentb39bebee06730d3c181a259c1768739089e051d9 (diff)
A bit more debugging to parser class to try to track down a crash
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/parser.h b/parser.h
index 10efc69b..0e731855 100644
--- a/parser.h
+++ b/parser.h
@@ -93,7 +93,7 @@ typedef struct block
int if_state; /**< The state of the if block, can be one of IF_STATE_UNTESTED, IF_STATE_FALSE, IF_STATE_TRUE */
wchar_t *switch_value; /**< The value to test in a switch block */
const wchar_t *source_dest; /**< The name of the file to source*/
- event_t *event; /**<The event that triggered this block */
+ event_t *event; /**<The event that triggered this block */
wchar_t *function_call_name;
} param1;
#endif
@@ -109,7 +109,10 @@ typedef struct block
state1_ptr = state;
} else {
state = dynamic_cast<block_state_t<T> *>(state1_ptr);
- assert(state != NULL);
+ if (state == NULL) {
+ printf("Expected type %s, but instead got type %s\n", typeid(T).name(), typeid(*state1_ptr).name());
+ abort();
+ }
}
return state->value;
}