MediaWiki master
MetadataMergeException.php
Go to the documentation of this file.
1<?php
7namespace MediaWiki\Session;
8
9use Exception;
10use UnexpectedValueException;
11
20class MetadataMergeException extends UnexpectedValueException {
22 protected $context;
23
30 public function __construct(
31 $message = '',
32 $code = 0,
33 ?Exception $previous = null,
34 array $context = []
35 ) {
36 parent::__construct( $message, $code, $previous );
37 $this->context = $context;
38 }
39
44 public function getContext() {
45 return $this->context;
46 }
47
51 public function setContext( array $context ) {
52 $this->context = $context;
53 }
54}
Subclass of UnexpectedValueException annotated with data for debug logs.
setContext(array $context)
Set context data.
__construct( $message='', $code=0, ?Exception $previous=null, array $context=[])