mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-18 23:10:05 +00:00
:octocat: wrap reader in try/catch
This commit is contained in:
+7
-2
@@ -18,8 +18,13 @@ $options->readerUseImagickIfAvailable = false;
|
||||
$options->readerGrayscale = true;
|
||||
$options->readerIncreaseContrast = true;
|
||||
|
||||
$result = (new QRCode($options))->readFromFile(__DIR__.'/../.github/images/example_image.png');
|
||||
try{
|
||||
$result = (new QRCode($options))->readFromFile(__DIR__.'/../.github/images/example_image.png');
|
||||
|
||||
var_dump($result);
|
||||
var_dump($result);
|
||||
}
|
||||
catch(Throwable $e){
|
||||
echo $e->getMessage();
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user