Introduced common exception superclass

This commit is contained in:
lukas committed 2026-10-15 13:39:44 +00:00
1 parent f749d4a05e
commit afafb1ac3d
12 files changed
+48 -28

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@
namespace CloudObjects\SDK\Common;
use Exception;
use CloudObjects\SDK\Exceptions\SDKException;
use ML\IRI\IRI;
use CloudObjects\SDK\NodeReader;
use Defuse\Crypto\Key, Defuse\Crypto\Crypto;
@@ -55,7 +55,7 @@ class CryptoHelper {
*/
public function __construct(ObjectRetriever $objectRetriever, ?IRI $namespaceCoid = null) {
if (!class_exists('Defuse\Crypto\Crypto'))
throw new Exception("Run composer require defuse/php-encryption before using CryptoHelper.");
throw new SDKException("Run composer require defuse/php-encryption before using CryptoHelper.");
$this->objectRetriever = $objectRetriever;
$this->namespace = isset($namespaceCoid)