Skip to content

Commit 7f39605

Browse files
added new Order exception
1 parent e589efd commit 7f39605

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

src/Database/Exception/Order.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace Utopia\Database\Exception;
4+
5+
use Throwable;
6+
use Utopia\Database\Exception;
7+
8+
class Order extends Exception
9+
{
10+
protected ?string $attribute;
11+
public function __construct(string $message, int|string $code = 0, ?Throwable $previous = null, ?string $attribute = null)
12+
{
13+
$this->attribute = $attribute;
14+
parent::__construct($message, $code, $previous);
15+
}
16+
public function getAttribute(): ?string
17+
{
18+
return $this->attribute;
19+
}
20+
}

0 commit comments

Comments
 (0)