Original (Russian): Отладка сброса (leave)
Debugging Leave situations might be tedious. It would be much easier if the debugger could catch leaves and break the code execution. Luckily, there is a way to achieve it:
#define __LEAVE_IF_ERR(_c) TInt32 __reason = _c; \
if (__reason < 0) { \
__BREAKPOINT(); \
User::Leave(__reason); \
}
The usage of this macro is similar to using User::LeaveIfError(), e.g. __LEAVE_IF_ERR(iFs.Connect()).
No related wiki articles found