Skip to content

Commit 7d7904e

Browse files
committed
ASSERT/ASSERT_TS: Add AssertOnAndClearRTError in fail case
This should make finding the place of lingering RTEs easier.
1 parent bbb48e1 commit 7d7904e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Packages/MIES/MIES_Utilities_ProgramFlow.ipf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ Function ASSERT(variable var, string errorMsg, [variable extendedOutput])
148148
try
149149
AbortOnValue var == 0, 1
150150
catch
151+
#ifndef AUTOMATED_TESTING
152+
AssertOnAndClearRTError()
153+
#endif // !AUTOMATED_TESTING
154+
151155
if(ParamIsDefault(extendedOutput))
152156
extendedOutput = 1
153157
else
@@ -284,6 +288,10 @@ threadsafe Function ASSERT_TS(variable var, string errorMsg, [variable extendedO
284288
try
285289
AbortOnValue var == 0, 1
286290
catch
291+
#ifndef AUTOMATED_TESTING
292+
AssertOnAndClearRTError()
293+
#endif // !AUTOMATED_TESTING
294+
287295
if(ParamIsDefault(extendedOutput))
288296
extendedOutput = 1
289297
else

0 commit comments

Comments
 (0)