wiki.techinc.nl/includes/gallery
Tim Starling ca71e69fc6 Try not to discard Excimer timeout exceptions
Don't catch and discard exceptions from the RequestTimeout library,
except when the exception is properly handled and the code seems to be
trying to wrap things up.

In most cases the exception is rethrown. Ideally it should instead be
done by narrowing the catch, and this was feasible in a few cases. But
sometimes the exception being caught is an instance of the base class
(notably DateTime::__construct()). Often Exception is the root of the
hierarchy of exceptions being thrown and so is the obvious catch-all.

Notes on specific callers:

* In the case of ResourceLoader::respond(), exceptions were caught for API
  correctness, but processing continued. I added an outer try block for
  timeout handling so that termination would be more prompt.
* In LCStoreCDB the Exception being caught was Cdb\Exception not
  \Exception. I added an alias to avoid confusion.
* In ImageGallery I added a special exception class.
* In Message::__toString() the rationale for catching disappears
  in PHP 7.4.0+, so I added a PHP version check.
* In PoolCounterRedis, let the shutdown function do its thing, but
  rethrow the exception for logging.

Change-Id: I4c3770b9efc76a1ce42ed9f59329c36de04d657c
2022-02-02 16:27:44 +11:00
..
Hook Document hook names in hook interfaces. 2020-09-27 12:03:12 +02:00
ImageGalleryBase.php Try not to discard Excimer timeout exceptions 2022-02-02 16:27:44 +11:00
ImageGalleryClassNotFoundException.php Try not to discard Excimer timeout exceptions 2022-02-02 16:27:44 +11:00
NolinesImageGallery.php
PackedHoverImageGallery.php Move PackedHoverImageGallery from PackedOverlayImageGallery.php 2019-04-06 14:12:02 +02:00
PackedImageGallery.php Add missing visibility on methods/consts of gallery related classes 2020-05-10 22:13:22 +00:00
PackedOverlayImageGallery.php Move PackedHoverImageGallery from PackedOverlayImageGallery.php 2019-04-06 14:12:02 +02:00
SlideshowImageGallery.php Set method visibility for various constructors 2019-12-03 20:17:30 +01:00
TraditionalImageGallery.php Narrow the signature of ParserOutput::addModules() and ::addModuleStyles() 2022-01-20 13:14:20 -05:00