Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ExceptionHandlerBlock.php
Go to the documentation of this file.
1 <?php
8 
11 
22 {
26  protected $blockName;
27 
31  public function __construct($blockName = '')
32  {
33  $this->blockName = $blockName;
34  }
35 
44  public function __call($method, $args)
45  {
46  throw new LocalizedException(
47  new Phrase('The "%1" block threw an exception, and it can\'t be rendered.', [$this->blockName])
48  );
49  }
50 
57  public function toHtml()
58  {
59  throw new LocalizedException(
60  new Phrase('The "%1" block threw an exception, and it can\'t be rendered.', [$this->blockName])
61  );
62  }
63 }
$method
Definition: info.phtml:13