| Current Path : /home/w/u/e/wuectly/www/03cbe/ |
| Current File : /home/w/u/e/wuectly/www/03cbe/Exception.zip |
PK ��"]]�7�� � RouteNotFoundException.phpnu &1i� <?php
/**
* Joomla! Content Management System
*
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Router\Exception;
defined('JPATH_PLATFORM') or die;
/**
* Exception class defining an error for a missing route
*
* @since 3.8.0
*/
class RouteNotFoundException extends \InvalidArgumentException
{
/**
* Constructor
*
* @param string $message The Exception message to throw.
* @param integer $code The Exception code.
* @param \Exception $previous The previous exception used for the exception chaining.
*
* @since 3.8.0
*/
public function __construct($message = '', $code = 404, \Exception $previous = null)
{
if (empty($message))
{
$message = 'URL was not found';
}
parent::__construct($message, $code, $previous);
}
}
PK j�"]ys쟬 � ExceptionHandler.phpnu &1i� <?php
/**
* Joomla! Content Management System
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Exception;
defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Document\Document;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
/**
* Displays the custom error page when an uncaught exception occurs.
*
* @since 3.0
*/
class ExceptionHandler
{
/**
* Handles exceptions: logs errors and renders error page.
*
* @param \Exception|\Throwable $error An Exception or Throwable (PHP 7+) object for which to render the error page.
*
* @return void
*
* @since 3.10.0
*/
public static function handleException($error)
{
if (static::isException($error))
{
static::logException($error);
}
static::render($error);
}
/**
* Render the error page based on an exception.
*
* @param \Exception|\Throwable $error An Exception or Throwable (PHP 7+) object for which to render the error page.
*
* @return void
*
* @since 3.0
*/
public static function render($error)
{
// Render template error page for exceptions only, because template will expect exception object
if (static::isException($error))
{
try
{
$app = Factory::getApplication();
// If site is offline and it's a 404 error, just go to index (to see offline message, instead of 404)
if ($error->getCode() == '404' && $app->get('offline') == 1)
{
$app->redirect('index.php');
}
$attributes = array(
'charset' => 'utf-8',
'lineend' => 'unix',
'tab' => "\t",
'language' => 'en-GB',
'direction' => 'ltr',
);
// If there is a \JLanguage instance in Factory then let's pull the language and direction from its metadata
if (Factory::$language)
{
$attributes['language'] = Factory::getLanguage()->getTag();
$attributes['direction'] = Factory::getLanguage()->isRtl() ? 'rtl' : 'ltr';
}
$document = Document::getInstance('error', $attributes);
if (!$document)
{
// We're probably in an CLI environment
jexit($error->getMessage());
}
// Get the current template from the application
$template = $app->getTemplate();
// Push the error object into the document
$document->setError($error);
// Clear buffered output at all levels
while (ob_get_level())
{
ob_end_clean();
}
// This is needed to ensure the test suite can still get the output buffer
ob_start();
$document->setTitle(Text::_('ERROR') . ': ' . $error->getCode());
$data = $document->render(
false,
array(
'template' => $template,
'directory' => JPATH_THEMES,
'debug' => JDEBUG,
)
);
// Do not allow cache
$app->allowCache(false);
// If nothing was rendered, just use the message from the Exception
if (empty($data))
{
$data = $error->getMessage();
}
$app->setBody($data);
echo $app->toString();
$app->close(0);
// This return is needed to ensure the test suite does not trigger the non-Exception handling below
return;
}
catch (\Throwable $e)
{
// Pass the error down
}
catch (\Exception $e)
{
// Pass the error down
}
}
// This isn't an Exception, we can't handle it.
if (!headers_sent())
{
header('HTTP/1.1 500 Internal Server Error');
}
$message = 'Error';
if (static::isException($error))
{
// Make sure we do not display sensitive data in production environments
if (ini_get('display_errors'))
{
$message .= ': ';
if (isset($e))
{
$message .= $e->getMessage() . ': ';
}
$message .= $error->getMessage();
}
}
echo $message;
jexit(1);
}
/**
* Checks if given error belong to PHP exception class (\Throwable for PHP 7+, \Exception for PHP 5-).
*
* @param mixed $error Any error value.
*
* @return bool
*
* @since 3.10.0
*/
protected static function isException($error)
{
$expectedClass = PHP_MAJOR_VERSION >= 7 ? '\Throwable' : '\Exception';
return $error instanceof $expectedClass;
}
/**
* Logs exception, catching all possible errors during logging.
*
* @param \Exception|\Throwable $error An Exception or Throwable (PHP 7+) object to get error message from.
*
* @return void
*
* @since 3.10.0
*/
protected static function logException($error)
{
// Try to log the error, but don't let the logging cause a fatal error
try
{
Log::add(
sprintf(
'Uncaught %1$s of type %2$s thrown. Stack trace: %3$s',
PHP_MAJOR_VERSION >= 7 ? 'Throwable' : 'Exception',
get_class($error),
$error->getTraceAsString()
),
Log::CRITICAL,
'error'
);
}
catch (\Throwable $e)
{
// Logging failed, don't make a stink about it though
}
catch (\Exception $e)
{
// Logging failed, don't make a stink about it though
}
}
}
PK #]�1.� � AccessForbidden.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2020 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 2, or later
*/
namespace FOF30\View\Exception;
defined('_JEXEC') || die;
use Exception;
use Joomla\CMS\Language\Text;
use RuntimeException;
/**
* Exception thrown when the access to the requested resource is forbidden under the current execution context
*/
class AccessForbidden extends RuntimeException
{
public function __construct($message = "", $code = 403, Exception $previous = null)
{
if (empty($message))
{
$message = Text::_('JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN');
}
parent::__construct($message, $code, $previous);
}
}
PK �
#]��s s EmptyStack.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2020 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 2, or later
*/
namespace FOF30\View\Exception;
defined('_JEXEC') || die;
use Exception;
use Joomla\CMS\Language\Text;
use RuntimeException;
/**
* Exception thrown when we are trying to operate on an empty section stack
*/
class EmptyStack extends RuntimeException
{
public function __construct($message = "", $code = 500, Exception $previous = null)
{
$message = Text::_('LIB_FOF_VIEW_EMPTYSECTIONSTACK');
parent::__construct($message, $code, $previous);
}
}
PK �
#] ��| | ModelNotFound.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2020 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 2, or later
*/
namespace FOF30\View\Exception;
defined('_JEXEC') || die;
use Exception;
use Joomla\CMS\Language\Text;
use RuntimeException;
/**
* Exception thrown when we can't get a Controller's name
*/
class ModelNotFound extends RuntimeException
{
public function __construct($path, $viewName, $code = 500, Exception $previous = null)
{
$message = Text::sprintf('LIB_FOF_VIEW_MODELNOTINVIEW', $path, $viewName);
parent::__construct($message, $code, $previous);
}
}
PK �
#]�ФS� � UnrecognisedExtension.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2020 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 2, or later
*/
namespace FOF30\View\Exception;
defined('_JEXEC') || die;
use Exception;
use InvalidArgumentException;
use Joomla\CMS\Language\Text;
/**
* Exception thrown when we can't figure out which engine to use for a view template
*/
class UnrecognisedExtension extends InvalidArgumentException
{
public function __construct($path, $code = 500, Exception $previous = null)
{
$message = Text::sprintf('LIB_FOF_VIEW_UNRECOGNISEDEXTENSION', $path);
parent::__construct($message, $code, $previous);
}
}
PK �
#]��ai� � CannotGetName.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2020 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 2, or later
*/
namespace FOF30\Model\Exception;
defined('_JEXEC') || die;
use Exception;
use Joomla\CMS\Language\Text;
use RuntimeException;
/**
* Exception thrown when we can't get a Controller's name
*/
class CannotGetName extends RuntimeException
{
public function __construct($message = "", $code = 500, Exception $previous = null)
{
if (empty($message))
{
$message = Text::_('LIB_FOF_MODEL_ERR_GET_NAME');
}
parent::__construct($message, $code, $previous);
}
}
PK �
#]�H�t� � PossiblySuhosin.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2020 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 2, or later
*/
namespace FOF30\View\Exception;
defined('_JEXEC') || die;
use Exception;
use Joomla\CMS\Language\Text;
use RuntimeException;
/**
* Exception thrown when the access to the requested resource is forbidden under the current execution context
*/
class PossiblySuhosin extends RuntimeException
{
public function __construct($message = "", $code = 403, Exception $previous = null)
{
if (empty($message))
{
$message = Text::_('LIB_FOF_VIEW_POSSIBLYSUHOSIN');
}
parent::__construct($message, $code, $previous);
}
}
PK �#]QeJi i MissingAttribute.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace FOF40\Toolbar\Exception;
defined('_JEXEC') || die;
use Exception;
use Joomla\CMS\Language\Text;
class MissingAttribute extends \InvalidArgumentException
{
public function __construct(string $missingArgument, string $buttonType, int $code = 500, Exception $previous = null)
{
$message = Text::sprintf('LIB_FOF40_TOOLBAR_ERR_MISSINGARGUMENT', $missingArgument, $buttonType);
parent::__construct($message, $code, $previous);
}
}
PK �#]�YoA A UnknownButtonType.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace FOF40\Toolbar\Exception;
defined('_JEXEC') || die;
use Exception;
use Joomla\CMS\Language\Text;
class UnknownButtonType extends \InvalidArgumentException
{
public function __construct(string $buttonType, int $code = 500, Exception $previous = null)
{
$message = Text::sprintf('LIB_FOF40_TOOLBAR_ERR_UNKNOWNBUTTONTYPE', $buttonType);
parent::__construct($message, $code, $previous);
}
}
PK #]݄�ы � NotADataModel.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace FOF40\Controller\Exception;
defined('_JEXEC') || die;
use InvalidArgumentException;
/**
* Exception thrown when the provided Model is not a DataModel
*/
class NotADataModel extends InvalidArgumentException
{
}
PK #]��� � TaskNotFound.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace FOF40\Controller\Exception;
defined('_JEXEC') || die;
use InvalidArgumentException;
/**
* Exception thrown when we can't find a suitable method to handle the requested task
*/
class TaskNotFound extends InvalidArgumentException
{
}
PK #]�2�� � LockedRecord.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace FOF40\Controller\Exception;
defined('_JEXEC') || die;
use Exception;
use Joomla\CMS\Language\Text;
use RuntimeException;
/**
* Exception thrown when the provided Model is locked for writing by another user
*/
class LockedRecord extends RuntimeException
{
public function __construct(string $message = "", int $code = 403, Exception $previous = null)
{
if (empty($message))
{
$message = Text::_('LIB_FOF40_CONTROLLER_ERR_LOCKED');
}
parent::__construct($message, $code, $previous);
}
}
PK #]���a� � ItemNotFound.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace FOF40\Controller\Exception;
defined('_JEXEC') || die;
use RuntimeException;
/**
* Exception thrown when we can't find the requested item in a read task
*/
class ItemNotFound extends RuntimeException
{
}
PK #]���\� � NotADataView.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace FOF40\Controller\Exception;
defined('_JEXEC') || die;
use InvalidArgumentException;
/**
* Exception thrown when the provided View does not implement DataViewInterface
*/
class NotADataView extends InvalidArgumentException
{
}
PK �#]����q q InvalidFieldObject.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2020 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 2, or later
*/
namespace FOF30\Model\DataModel\Filter\Exception;
defined('_JEXEC') || die;
use Exception;
use InvalidArgumentException;
use Joomla\CMS\Language\Text;
class InvalidFieldObject extends InvalidArgumentException
{
public function __construct($message = "", $code = 500, Exception $previous = null)
{
if (empty($message))
{
$message = Text::_('LIB_FOF_MODEL_ERR_FILTER_INVALIDFIELD');
}
parent::__construct($message, $code, $previous);
}
}
PK �#]��C�\ \ NoDatabaseObject.phpnu &1i� <?php
/**
* @package FOF
* @copyright Copyright (c)2010-2020 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 2, or later
*/
namespace FOF30\Model\DataModel\Filter\Exception;
defined('_JEXEC') || die;
use Exception;
use InvalidArgumentException;
use Joomla\CMS\Language\Text;
class NoDatabaseObject extends InvalidArgumentException
{
public function __construct($fieldType, $code = 500, Exception $previous = null)
{
$message = Text::sprintf('LIB_FOF_MODEL_ERR_FILTER_NODBOBJECT', $fieldType);
parent::__construct($message, $code, $previous);
}
}
PK ��"]]�7�� � RouteNotFoundException.phpnu &1i� PK j�"]ys쟬 � � ExceptionHandler.phpnu &1i� PK #]�1.� � � AccessForbidden.phpnu &1i� PK �
#]��s s � EmptyStack.phpnu &1i� PK �
#] ��| | � ModelNotFound.phpnu &1i� PK �
#]�ФS� � B UnrecognisedExtension.phpnu &1i� PK �
#]��ai� � +# CannotGetName.phpnu &1i� PK �
#]�H�t� � �% PossiblySuhosin.phpnu &1i� PK �#]QeJi i �( MissingAttribute.phpnu &1i� PK �#]�YoA A �+ UnknownButtonType.phpnu &1i� PK #]݄�ы � . NotADataModel.phpnu &1i� PK #]��� � �/ TaskNotFound.phpnu &1i� PK #]�2�� � �1 LockedRecord.phpnu &1i� PK #]���a� � �4 ItemNotFound.phpnu &1i� PK #]���\� � }6 NotADataView.phpnu &1i� PK �#]����q q X8 InvalidFieldObject.phpnu &1i� PK �#]��C�\ \ ; NoDatabaseObject.phpnu &1i� PK � �=