Catch EPC QR failures
This commit is contained in:
parent
aade9c8f0b
commit
79d032fa4b
2 changed files with 4 additions and 8 deletions
|
|
@ -49,9 +49,9 @@ class EpcQrGenerator
|
|||
$this->validateFields();
|
||||
|
||||
try {
|
||||
$qr = $writer->writeString($this->encodeMessage());
|
||||
$qr = $writer->writeString($this->encodeMessage());
|
||||
}
|
||||
catch(\Exception $e){
|
||||
catch(BaconQrCode\Exception\WriterException $e){
|
||||
return '';
|
||||
}
|
||||
return "<svg viewBox='0 0 200 200' width='200' height='200' x='0' y='0' xmlns='http://www.w3.org/2000/svg'>
|
||||
|
|
|
|||
|
|
@ -40,12 +40,8 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
|
||||
class TaskSchedulerService
|
||||
{
|
||||
public Scheduler $scheduler;
|
||||
|
||||
public function __construct(Scheduler $scheduler)
|
||||
{
|
||||
$this->scheduler = $scheduler;
|
||||
}
|
||||
|
||||
public function __construct(public Scheduler $scheduler) {}
|
||||
|
||||
public function store(Scheduler $scheduler, CreateScheduledTaskRequest $request)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue