17 lines
444 B
PHP
17 lines
444 B
PHP
<?php
|
|
namespace WorkbloomERP\Exceptions;
|
|
|
|
use Exception;
|
|
use Throwable;
|
|
|
|
class AppException extends Exception {
|
|
protected array $details = [];
|
|
public function __construct(string $message, int $code = 500, array $details = [], ?Throwable $previous = null) {
|
|
parent::__construct($message, $code, $previous);
|
|
$this->details = $details;
|
|
}
|
|
|
|
public function getDetails(): array {
|
|
return $this->details;
|
|
}
|
|
} |