Something went wrong. Try again.
Parse and validate AT Protocol Lexicons with DTO generation for Laravel
Something went wrong. Try again.
713 B · 39 lines
PHP
at dev
12345678910111213141516171819202122232425262728293031323334353637383940<?php
namespace SocialDept\AtpSchema\Exceptions;
use Exception;
class SchemaException extends Exception{ /** * Additional context data for the exception. */ protected array $context = [];
/** * Set context data. */ public function setContext(array $context): self { $this->context = $context;
return $this; }
/** * Get context data. */ public function getContext(): array { return $this->context; }
/** * Create exception with context. */ public static function withContext(string $message, array $context = []): self { return (new static($message))->setContext($context); }}