mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Managed error while generating URL previews by throwing an exception
This commit is contained in:
10
module/Common/src/Exception/PreviewGenerationException.php
Normal file
10
module/Common/src/Exception/PreviewGenerationException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Shlinkio\Shlink\Common\Exception;
|
||||
|
||||
class PreviewGenerationException extends RuntimeException
|
||||
{
|
||||
public static function fromImageError($error)
|
||||
{
|
||||
return new self(sprintf('Error generating a preview image with error: %s', $error));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user