Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Exception/BlockSizeTooSmallException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

namespace Endroid\QrCode\Exception;

final class BlockSizeTooSmallException extends \Exception
{
}
3 changes: 2 additions & 1 deletion src/Matrix/Matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Endroid\QrCode\Matrix;

use Endroid\QrCode\Exception\BlockSizeTooSmallException;
use Endroid\QrCode\RoundBlockSizeMode;

final readonly class Matrix implements MatrixInterface
Expand Down Expand Up @@ -43,7 +44,7 @@ public function __construct(
}

if ($blockSize < 1) {
throw new \Exception('Too much data: increase image dimensions or lower error correction level');
throw new BlockSizeTooSmallException('Too much data: increase image dimensions or lower error correction level');
}

$this->blockSize = $blockSize;
Expand Down