Parse and validate AT Protocol Lexicons with DTO generation for Laravel
1<?php
2
3namespace SocialDept\AtpSchema\Exceptions;
4
5class SchemaNotFoundException extends SchemaException
6{
7 /**
8 * Create exception for missing NSID.
9 */
10 public static function forNsid(string $nsid): self
11 {
12 return static::withContext(
13 "Schema not found for NSID: {$nsid}",
14 ['nsid' => $nsid]
15 );
16 }
17
18 /**
19 * Create exception for missing file.
20 */
21 public static function forFile(string $path): self
22 {
23 return static::withContext(
24 "Schema file not found: {$path}",
25 ['path' => $path]
26 );
27 }
28}