MediaWiki master
MetadataMergeException.php
Go to the documentation of this file.
1<?php
24namespace MediaWiki\Session;
25
26use Exception;
27use UnexpectedValueException;
28
36class MetadataMergeException extends UnexpectedValueException {
38 protected $context;
39
46 public function __construct(
47 $message = '',
48 $code = 0,
49 Exception $previous = null,
50 array $context = []
51 ) {
52 parent::__construct( $message, $code, $previous );
53 $this->context = $context;
54 }
55
60 public function getContext() {
61 return $this->context;
62 }
63
68 public function setContext( array $context ) {
69 $this->context = $context;
70 }
71}
Subclass of UnexpectedValueException that can be annotated with additional data for debug logging.
setContext(array $context)
Set context data.
__construct( $message='', $code=0, Exception $previous=null, array $context=[])