os/security/crypto/weakcryptospi/test/tcryptospi/src/traplog.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 /**
    22  @file
    23  @internalTechnology
    24 */
    25 #if (!defined __TRAPLOG_H__)
    26 #define __TRAPLOG_H__
    27 
    28 #include <e32cmn.h>
    29 													
    30 #define TRAP_LOG(_err, _call)										\
    31 	{																\
    32 	TInt& __eref = _err;											\
    33 	__eref = 0;														\
    34 	TRAP(__eref, _call);											\
    35 	if(__eref != KErrNone)											\
    36 		{															\
    37 		INFO_PRINTF2(_L("*** ERROR: TRAP_LOG Leave - %d"), __eref);	\
    38 		User::Leave(__eref);										\
    39 		}															\
    40 	}																\
    41 
    42 #define TRAPD_LOG(_err, _call)										\
    43 	TInt _err;														\
    44 	{																\
    45 	TRAP(_err, _call);												\
    46 	if(_err != KErrNone)											\
    47 		{															\
    48 		INFO_PRINTF2(_L("*** ERROR: TRAPD_LOG Leave - %d"), _err);	\
    49 		User::Leave(_err);											\
    50 		}															\
    51 	}																\
    52 
    53 #endif	//__TRAPLOG_H__