mirror of
https://github.com/Intervention/image.git
synced 2025-01-17 20:28:21 +01:00
Edit error messages
This commit is contained in:
parent
c534d4aaa8
commit
4462e64704
@ -26,7 +26,7 @@ abstract class AbstractColor implements ColorInterface
|
||||
});
|
||||
|
||||
if (count($channels) == 0) {
|
||||
throw new ColorException('Channel ' . $classname . ' could not be found.');
|
||||
throw new ColorException('Color channel ' . $classname . ' could not be found.');
|
||||
}
|
||||
|
||||
return reset($channels);
|
||||
|
@ -40,7 +40,7 @@ class ColorProcessor implements ColorProcessorInterface
|
||||
public function nativeToColor(mixed $value): ColorInterface
|
||||
{
|
||||
if (! is_int($value)) {
|
||||
throw new ColorException("GD driver can only decode colors in integer format.");
|
||||
throw new ColorException('GD driver can only decode colors in integer format.');
|
||||
}
|
||||
|
||||
$a = ($value >> 24) & 0xFF;
|
||||
|
@ -32,7 +32,7 @@ class Driver extends AbstractDriver
|
||||
{
|
||||
if (!extension_loaded('gd') || !function_exists('gd_info')) {
|
||||
throw new RuntimeException(
|
||||
'GD Library extension not available with this PHP installation.'
|
||||
'GD PHP extension must be installed to use this driver.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ class ColorspaceModifier extends DriverSpecializedModifier
|
||||
{
|
||||
if (!is_a($this->targetColorspace(), RgbColorspace::class)) {
|
||||
throw new NotSupportedException(
|
||||
'Only RGB colorspace is supported with GD driver.'
|
||||
'Only RGB colorspace is supported by GD driver.'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ class Core implements CoreInterface, Iterator
|
||||
}
|
||||
}
|
||||
|
||||
throw new AnimationException('Frame #' . $position . ' is not be found in the image.');
|
||||
throw new AnimationException('Frame #' . $position . ' could not be found in the image.');
|
||||
}
|
||||
|
||||
public function loops(): int
|
||||
|
@ -34,7 +34,7 @@ class Driver extends AbstractDriver
|
||||
{
|
||||
if (!extension_loaded('imagick') || !class_exists('Imagick')) {
|
||||
throw new RuntimeException(
|
||||
'ImageMagick extension not available with this PHP installation.'
|
||||
'Imagick PHP extension must be installed to use this driver.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user