Commit 7abfc03 1 parent 0940843 commit 7abfc03 Copy full SHA for 7abfc03
File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ namespace hook
132
132
NESTING_LIMIT = 84 , // the hook nested blocks/loops/ifs beyond 16 levels
133
133
SECTIONS_OUT_OF_SEQUENCE = 85 , // the wasm contained sections out of sequence
134
134
CUSTOM_SECTION_DISALLOWED = 86 , // the wasm contained a custom section (id=0)
135
+ INTERNAL_ERROR = 87 , // an internal error described by the log text
135
136
// RH NOTE: only HookSet msgs got log codes, possibly all Hook log lines should get a code?
136
137
};
137
138
};
Original file line number Diff line number Diff line change @@ -1260,7 +1260,13 @@ SetHook::setHook()
1260
1260
1261
1261
// if there is only an existing hook, without a HookSetObj then it is
1262
1262
// logically impossible for the operation to not be NOOP
1263
- assert (hookSetObj || op == hsoNOOP);
1263
+ if (!hookSetObj && op != hsoNOOP)
1264
+ {
1265
+ JLOG (ctx.j .warn ())
1266
+ << " HookSet(" << hook::log ::INTERNAL_ERROR << " )[" << HS_ACC ()
1267
+ << " ]: Logic error. !hookSetObj && op != hsoNOOP" ;
1268
+ return tecINTERNAL;
1269
+ }
1264
1270
1265
1271
switch (op)
1266
1272
{
You can’t perform that action at this time.
0 commit comments