// UC_TRP.CPP
//
// Copyright (c) 1994-1999 Symbian Ltd.  All rights reserved.
//

#include "uc_std.h"

EXPORT_C TTrapHandler::TTrapHandler()
//
// Constructor.
//
	{}

EXPORT_C void TTrap::UnTrap()
//
// Pop the current trap frame
//
	{

	TTrapHandler *pH=Exec::PopTrapFrame()->iHandler;
	if (pH!=NULL)
		pH->UnTrap();
	}

EXPORT_C void User::LeaveNoMemory()
//
// Leave with the KErrNoMemory error.
//
	{

	Leave(KErrNoMemory);
	}

EXPORT_C TInt User::LeaveIfError(TInt aReason)
//
// Leave if aReason is negative.
//
	{

	if (aReason<0)
		User::Leave(aReason);
	return(aReason);
	}

EXPORT_C TAny * User::LeaveIfNull(TAny *aPtr)
//
// Leave if aPtr is null.
//
	{

	if (aPtr==NULL)
		User::LeaveNoMemory();
	return(aPtr);
	}

