diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-FC24C65C-0DCB-5E07-9A68-9001D34664DD.dita --- a/Symbian3/PDK/Source/GUID-FC24C65C-0DCB-5E07-9A68-9001D34664DD.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-FC24C65C-0DCB-5E07-9A68-9001D34664DD.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,18 +1,18 @@ - - - - - -OR_LEAVE MACRO

The OR_LEAVE macro is a convenient macro that allows the application developer to de-emphasize auxiliary error checking code in most cases. It is a postfix macro which implements User::LeaveIfError on an integer return type. This means that there is less focus on the error handling code and makes the code easier to read.

Need for OR_Leave Macro

Motive behind using a OR_LEAVE macro is that it should not return an integer value. It is intended for use as a postfix macro at the end of a statement. If OR_LEAVE was to return an integer value, it would encourage its use in the middle of expressions negating its intended purpose which is to reduce the focus on error checking code.

Defining OR_Leave Macro

The OR_LEAVE macro is defined as a postfix operator as shown below:

- #define OR_LEAVE || ELeave - inline void operator||(TInt aStatus, TLeave /*aTag*/) - { - User::LeaveIfError(aStatus); - } + + + + + +OR_LEAVE MACRO

The OR_LEAVE macro is a convenient macro that allows the application developer to de-emphasize auxiliary error checking code in most cases. It is a postfix macro which implements User::LeaveIfError on an integer return type. This means that there is less focus on the error handling code and makes the code easier to read.

Need for OR_Leave Macro

Motive behind using a OR_LEAVE macro is that it should not return an integer value. It is intended for use as a postfix macro at the end of a statement. If OR_LEAVE was to return an integer value, it would encourage its use in the middle of expressions negating its intended purpose which is to reduce the focus on error checking code.

Defining OR_Leave Macro

The OR_LEAVE macro is defined as a postfix operator as shown below:

+ #define OR_LEAVE || ELeave + inline void operator||(TInt aStatus, TLeave /*aTag*/) + { + User::LeaveIfError(aStatus); + }
See Also

EUser High Level Library Overview

EUser High Level Library Tutorials

\ No newline at end of file