Update contrib.
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 Miscellaneous utilities that can help make code more readable.
28 A convenience postfix macro that is equivalent to wrapping the
29 preceding expression with User::LeaveIfError().
33 fs.Connect() OR_LEAVE;
39 User::LeaveIfError(fs.Connect());
42 The implementation happens to rely on overloading operator|| for
43 TLeave. However, this macro is not intended for use within general
44 expressions, just to guard individual calls to methods that may
47 #define OR_LEAVE || ELeave
50 Enabling overload for OR_LEAVE. Should only be invoked via
51 OR_LEAVE, never directly.
53 inline void operator||(TInt aStatus, TLeave /*aTag*/)
55 User::LeaveIfError(aStatus);