Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
View
Element
ExceptionHandlerBlock.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\View\Element
;
8
9
use
Magento\Framework\Exception\LocalizedException
;
10
use
Magento\Framework\Phrase
;
11
21
class
ExceptionHandlerBlock
implements
BlockInterface
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
}
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\Framework\View\Element
Definition:
AbstractBlock.php:6
$method
$method
Definition:
info.phtml:13
Magento\Framework\View\Element\ExceptionHandlerBlock\__construct
__construct($blockName='')
Definition:
ExceptionHandlerBlock.php:31
Magento\Framework\View\Element\BlockInterface
Definition:
BlockInterface.php:16
Magento\Framework\View\Element\ExceptionHandlerBlock\$blockName
$blockName
Definition:
ExceptionHandlerBlock.php:26
Magento\Framework\Phrase
Definition:
Phrase.php:17
Magento\Framework\Phrase
Magento\Framework\View\Element\ExceptionHandlerBlock\toHtml
toHtml()
Definition:
ExceptionHandlerBlock.php:57
Magento\Framework\View\Element\ExceptionHandlerBlock
Definition:
ExceptionHandlerBlock.php:21
Magento\Framework\View\Element\ExceptionHandlerBlock\__call
__call($method, $args)
Definition:
ExceptionHandlerBlock.php:44