code/error/error.php
public static function getError($unset = false)
	{
		JLog::add('JError::getError() is deprecated.', JLog::WARNING, 'deprecated');

		if (!isset(self::$stack[0]))
		{
			return false;
		}

		if ($unset)
		{
			$error = array_shift(self::$stack);
		}
		else
		{
			$error = &self::$stack[0];
		}

		return $error;
	}
public static function getError($unset = false)
	{
		JLog::add('JError::getError() is deprecated.', JLog::WARNING, 'deprecated');

		if (!isset(self::$stack[0]))
		{
			return false;
		}

		if ($unset)
		{
			$error = array_shift(self::$stack);
		}
		else
		{
			$error = &self::$stack[0];
		}

		return $error;
	}
public static function getError ( $ unset = false ) { JLog :: add ( 'JError::getError() is deprecated.' , JLog :: WARNING , 'deprecated' ) ; if ( ! isset ( self :: $ stack [ 0 ] ) ) { return false ; } if ( $ unset ) { $ error = array_shift ( self :: $ stack ) ; } else { $ error = & self :: $ stack [ 0 ] ; } return $ error ; }
Method for retrieving the last exception object in the error stack

@param   boolean  $unset  True to remove the error from the stack.

@return  JException|boolean  Last JException object in the error stack or boolean false if none exist

@deprecated  12.1
@since   11.1
Method for retrieving the last exception object in the error stack