<?php namespace app; use Throwable; class UserException extends \Exception{ public $data; /** * @param mixed $data */ public function setData($data): void { $this->data = $data; } }