emisc.h File Reference

Detailed Description

Miscellaneous utilities that can help make code more readable.

OR_LEAVE

A convenience postfix macro that is equivalent to wrapping the preceding expression with User::LeaveIfError().

The code:
   fs.Connect() OR_LEAVE;

is equivalent to:

   User::LeaveIfError(fs.Connect());

The implementation happens to rely on overloading operator|| for TLeave. However, this macro is not intended for use within general expressions, just to guard individual calls to methods that may return an error code.

operator|| ( TInt, TLeave )

voidoperator||(TIntaStatus,
TLeave
)[inline]

Enabling overload for OR_LEAVE. Should only be invoked via OR_LEAVE, never directly.