PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / rosell-dk / webp-convert / src / Exceptions / WebPConvertException.php

WebPConvertException.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 4.7.0, at vendor/rosell-dk/webp-convert/src/Exceptions/WebPConvertException.php

45 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WebPConvert\Exceptions;
4
5 /**
6 * WebPConvertException is the base exception for all exceptions in this library.
7 *
8 * Note that the parameters for the constructor differs from that of the Exception class.
9 * We do not use exception code here, but are instead allowing two version of the error message:
10 * a short version and a long version.
11 * The short version may not contain special characters or dynamic content.
12 * The detailed version may.
13 * If the detailed version isn't provided, getDetailedMessage will return the short version.
14 *
15 */
16 class WebPConvertException extends \Exception
17 {
18 public $description = '';
19 protected $detailedMessage;
20 protected $shortMessage;
21
22 public function getDetailedMessage()
23 {
24 return $this->detailedMessage;
25 }
26
27 public function getShortMessage()
28 {
29 return $this->shortMessage;
30 }
31
32 public function __construct($shortMessage = "", $detailedMessage = "", $previous = null)
33 {
34 $detailedMessage = ($detailedMessage != '') ? $detailedMessage : $shortMessage;
35 $this->detailedMessage = $detailedMessage;
36 $this->shortMessage = $shortMessage;
37
38 parent::__construct(
39 $detailedMessage,
40 0,
41 $previous
42 );
43 }
44 }
45