CoreFiles by mySites.guru
ErrorEvent.php59 lines, 1,099 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
16b244ed17aa361ad137ee1b037062bb
sha1
3633eca670ce033f48d22ecc723ffbda0481de19
sha256
765d8a5f6e202abae626d571444a0f425172d92ac907d004492012021e1c7615
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */

namespace Joomla\CMS\Event;

defined('JPATH_PLATFORM') or die;

use Joomla\Application\AbstractApplication;

/**
 * Event class for representing the application's `onError` event
 *
 * @since  4.0.0
 */
class ErrorEvent extends AbstractEvent
{
	/**
	 * Get the event's application object
	 *
	 * @return  AbstractApplication
	 *
	 * @since   4.0.0
	 */
	public function getApplication(): AbstractApplication
	{
		return $this->arguments['application'];
	}

	/**
	 * Get the event's error object
	 *
	 * @return  \Throwable
	 *
	 * @since   4.0.0
	 */
	public function getError(): \Throwable
	{
		return $this->getArgument('subject');
	}

	/**
	 * Set the event's error object
	 *
	 * @param   \Throwable  $error  The new error to process
	 *
	 * @return  void
	 *
	 * @since   4.0.0
	 */
	public function setError(\Throwable $error)
	{
		$this->setArgument('subject', $error);
	}
}

No other release has this exact content. See every version of this file.