WebP Express CloudHost.es Fix v0.25.9-cloudhost
✅ Fixed bulk conversion getting stuck on missing files ✅ Added robust error handling and timeout protection ✅ Improved JavaScript response parsing ✅ Added file existence validation ✅ Fixed missing PHP class imports ✅ Added comprehensive try-catch error recovery 🔧 Key fixes: - File existence checks before conversion attempts - 30-second timeout protection per file - Graceful handling of 500 errors and JSON parsing issues - Automatic continuation to next file on failures - Cache busting for JavaScript updates 🎯 Result: Bulk conversion now completes successfully even with missing files 🚀 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
10
vendor/rosell-dk/webp-convert/src/Exceptions/InvalidInput/InvalidImageTypeException.php
vendored
Normal file
10
vendor/rosell-dk/webp-convert/src/Exceptions/InvalidInput/InvalidImageTypeException.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace WebPConvert\Exceptions\InvalidInput;
|
||||
|
||||
use WebPConvert\Exceptions\InvalidInputException;
|
||||
|
||||
class InvalidImageTypeException extends InvalidInputException
|
||||
{
|
||||
public $description = 'The converter does not handle the supplied image type';
|
||||
}
|
||||
10
vendor/rosell-dk/webp-convert/src/Exceptions/InvalidInput/TargetNotFoundException.php
vendored
Normal file
10
vendor/rosell-dk/webp-convert/src/Exceptions/InvalidInput/TargetNotFoundException.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace WebPConvert\Exceptions\InvalidInput;
|
||||
|
||||
use WebPConvert\Exceptions\InvalidInputException;
|
||||
|
||||
class TargetNotFoundException extends InvalidInputException
|
||||
{
|
||||
public $description = 'The converter could not locate source file';
|
||||
}
|
||||
10
vendor/rosell-dk/webp-convert/src/Exceptions/InvalidInputException.php
vendored
Normal file
10
vendor/rosell-dk/webp-convert/src/Exceptions/InvalidInputException.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace WebPConvert\Exceptions;
|
||||
|
||||
use WebPConvert\Exceptions\WebPConvertException;
|
||||
|
||||
class InvalidInputException extends WebPConvertException
|
||||
{
|
||||
public $description = 'Invalid input';
|
||||
}
|
||||
10
vendor/rosell-dk/webp-convert/src/Exceptions/SanityException.txt
vendored
Normal file
10
vendor/rosell-dk/webp-convert/src/Exceptions/SanityException.txt
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace WebPConvert\Exceptions;
|
||||
|
||||
use WebPConvert\Exceptions\WebPConvertException;
|
||||
|
||||
class SanityException extends WebPConvertException
|
||||
{
|
||||
public $description = 'Sanity check failed';
|
||||
}
|
||||
44
vendor/rosell-dk/webp-convert/src/Exceptions/WebPConvertException.php
vendored
Normal file
44
vendor/rosell-dk/webp-convert/src/Exceptions/WebPConvertException.php
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace WebPConvert\Exceptions;
|
||||
|
||||
/**
|
||||
* WebPConvertException is the base exception for all exceptions in this library.
|
||||
*
|
||||
* Note that the parameters for the constructor differs from that of the Exception class.
|
||||
* We do not use exception code here, but are instead allowing two version of the error message:
|
||||
* a short version and a long version.
|
||||
* The short version may not contain special characters or dynamic content.
|
||||
* The detailed version may.
|
||||
* If the detailed version isn't provided, getDetailedMessage will return the short version.
|
||||
*
|
||||
*/
|
||||
class WebPConvertException extends \Exception
|
||||
{
|
||||
public $description = '';
|
||||
protected $detailedMessage;
|
||||
protected $shortMessage;
|
||||
|
||||
public function getDetailedMessage()
|
||||
{
|
||||
return $this->detailedMessage;
|
||||
}
|
||||
|
||||
public function getShortMessage()
|
||||
{
|
||||
return $this->shortMessage;
|
||||
}
|
||||
|
||||
public function __construct($shortMessage = "", $detailedMessage = "", $previous = null)
|
||||
{
|
||||
$detailedMessage = ($detailedMessage != '') ? $detailedMessage : $shortMessage;
|
||||
$this->detailedMessage = $detailedMessage;
|
||||
$this->shortMessage = $shortMessage;
|
||||
|
||||
parent::__construct(
|
||||
$detailedMessage,
|
||||
0,
|
||||
$previous
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user