Skip to content

Commit

Permalink
ASSERT/ASSERT_TS: Add more output in recursive assertion case
Browse files Browse the repository at this point in the history
The error should be really rare, but in case it bites us, it helps to have
some more info. We also do use the direct functions are we want to avoid
any potential for more asssertions.
  • Loading branch information
t-b committed Sep 25, 2023
1 parent 7502ec9 commit 51f74d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Packages/MIES/MIES_Utilities.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ Function ASSERT(variable var, string errorMsg, [variable extendedOutput])

// Happens e.g. when ASSERT is encounterd in cleanup functions
print "Double Assertion Fail encountered !"
print errorMsg
print GetRTStackInfo(3)

if(doCallDebugger)
ControlWindowToFront()
Expand Down Expand Up @@ -239,6 +241,8 @@ threadsafe Function ASSERT_TS(variable var, string errorMsg, [variable extendedO
if(IsFunctionCalledRecursively())

print "Double threadsafe assertion Fail encountered !"
print errorMsg
print GetRTStackInfo(3)

AbortOnValue 1, 1
endif
Expand Down

0 comments on commit 51f74d4

Please sign in to comment.