CoreFiles by mySites.guru
ErrorEvent.php59 lines, 1,100 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
9b304c7f54e47a355b09b3b1dcb1f752
sha1
305a14d09b4ccaf899f18670cb562d5f87f56f2e
sha256
c3767a760ea94370836bc3638144d60f7c67d9969874cf301b2e2f788e680b27
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2019 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.