sl@0: // Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include "UL_STD.H" sl@0: sl@0: sl@0: #if defined (_DEBUG) sl@0: sl@0: #pragma BullseyeCoverage off sl@0: sl@0: // sl@0: // Leave to the current control region. sl@0: // sl@0: void Util::__DbgLeave(TInt aReason,const TDesC8& /*aFileName*/,TInt /*aLineNo*/) sl@0: { sl@0: //coverity[naming_error] sl@0: User::Leave(aReason); sl@0: } sl@0: sl@0: // sl@0: // Leave with the KErrNoMemory error. sl@0: // sl@0: void Util::__DbgLeaveNoMemory(const TDesC8& aFileName,TInt aLineNo) sl@0: { sl@0: //coverity[naming_error] sl@0: __DbgLeave(KErrNoMemory,aFileName,aLineNo); sl@0: } sl@0: sl@0: // sl@0: // Leave if aReason is negative. sl@0: // sl@0: TInt Util::__DbgLeaveIfError(TInt aReason,const TDesC8& aFileName,TInt aLineNo) sl@0: { sl@0: if (aReason<0) sl@0: { sl@0: //coverity[naming_error] sl@0: __DbgLeave(aReason,aFileName,aLineNo); sl@0: } sl@0: return aReason; sl@0: } sl@0: sl@0: // sl@0: // Leave if aPtr is null. sl@0: // sl@0: TAny *Util::__DbgLeaveIfNull(TAny *aPtr,const TDesC8& aFileName,TInt aLineNo) sl@0: { sl@0: if (aPtr==NULL) sl@0: { sl@0: //coverity[naming_error] sl@0: __DbgLeaveNoMemory(aFileName,aLineNo); sl@0: } sl@0: return aPtr; sl@0: } sl@0: sl@0: #pragma BullseyeCoverage on sl@0: sl@0: #endif sl@0: