CoreFiles by mySites.guru
ErrorEvent.php59 lines, 1,101 bytes, from Joomla_4.0.0-alpha5-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha3
md5
28ed83819e38edf064437a8df2b030e2
sha1
257b15da03ef8451cf88078798df37e8222ccd03
sha256
2bc548a2ce01ca61bd2ca43e61420fbc01c04c2e2729c6d05b18c2083865c495
<?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->getArgument('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.