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); } }