<?php
namespace Buglinjo\LaravelWebp\Exceptions;
use Exception;
use Throwable;
class CwebpShellExecutionFailed extends Exception
{
public function __construct(string $cmd, $output, $code = 0, Throwable $previous = null)
{
parent::__construct($this->makeMessage($cmd, $code, $output), $code, $previous);
}
/**
* @param string $cmd
* @param int $exitCode
* @param $output
* @return string
*/
protected function makeMessage(string $cmd, int $exitCode, $output): string
{
return 'Image conversion to WebP using cwebp failed with error code ' . $exitCode . ".\n"
. "This command was used to execute cwebp: \n"
. " " . $cmd . "\n"
. (
count($output)
? "The following output was sent to stdout: \n " . join("\n ", $output)
: "No output was sent to stdout"
);
}
}
How To Payment
Making a payment on our website is quick and secure. Start by logging in or creating an account. Select your preferred payment method, input the required details, and review the information. Once you confirm everything is correct, click on the "Submit Payment" button. You’ll receive instant confirmation and can track your payment status through your account dashboard. It’s an easy and secure process.