Something went wrong. Try again.
Parse and validate AT Protocol Lexicons with DTO generation for Laravel
Something went wrong. Try again.
712 B · 28 lines
PHP
at main
1234567891011121314151617181920212223242526272829<?php
namespace SocialDept\AtpSchema\Exceptions;
class SchemaParseException extends SchemaException{ /** * Create exception for invalid JSON. */ public static function invalidJson(string $nsid, string $error): self { return static::withContext( "Failed to parse schema JSON for {$nsid}: {$error}", ['nsid' => $nsid, 'error' => $error] ); }
/** * Create exception for malformed schema. */ public static function malformed(string $nsid, string $reason): self { return static::withContext( "Malformed schema for {$nsid}: {$reason}", ['nsid' => $nsid, 'reason' => $reason] ); }}