123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- // @codingStandardsIgnoreFile
- ?>
- <header class="header">
- <img class="logo" src="<?= $this->basePath() ?>/pub/images/magento-icon.svg" alt="Magento"/>
- <h1 class="header-title">A 404 error occurred</h1>
- </header>
- <h2>Page not found</h2>
- <?php if ( isset( $this->reason ) && $this->reason ): ?>
- <?php
- $reasonMessage = '';
- switch ( $this->reason ) {
- case 'error-controller-cannot-dispatch':
- $reasonMessage = 'The requested controller was unable to dispatch the request.';
- break;
- case 'error-controller-not-found':
- $reasonMessage = 'The requested controller could not be mapped to an existing controller class.';
- break;
- case 'error-controller-invalid':
- $reasonMessage = 'The requested controller was not dispatchable.';
- break;
- case 'error-router-no-match':
- $reasonMessage = 'The requested URL could not be matched by routing.';
- break;
- default:
- $reasonMessage = 'We cannot determine at this time why a 404 was generated.';
- break;
- }
- ?>
- <p><?= $reasonMessage ?></p>
- <?php endif ?>
- <?php if ( isset( $this->controller ) && $this->controller ): ?>
- <dl>
- <dt>Controller:</dt>
- <dd><?= $this->escapeHtml( $this->controller ) ?>
- <?php
- if ( isset( $this->controller_class )
- && $this->controller_class
- && $this->controller_class != $this->controller
- ) {
- echo '(' . sprintf( 'resolves to %s', $this->escapeHtml( $this->controller_class ) ) . ')';
- }
- ?>
- </dd>
- </dl>
- <?php endif ?>
- <?php if ( isset( $this->display_exceptions ) && $this->display_exceptions ): ?>
- <?php if ( isset( $this->exception ) && $this->exception instanceof Exception ): ?>
- <hr/>
- <h2>Additional information:</h2>
- <h3><?= get_class( $this->exception ) ?></h3>
- <dl>
- <dt>File:</dt>
- <dd>
- <pre class="prettyprint linenums"><?= $this->exception->getFile() ?>:<?= $this->exception->getLine() ?></pre>
- </dd>
- <dt>Message:</dt>
- <dd>
- <pre class="prettyprint linenums"><?= $this->exception->getMessage() ?></pre>
- </dd>
- <dt>Stack trace:</dt>
- <dd>
- <pre class="prettyprint linenums"><?= $this->exception->getTraceAsString() ?></pre>
- </dd>
- </dl>
- <?php
- $e = $this->exception->getPrevious();
- if ( $e ) :
- ?>
- <hr/>
- <h2>Previous exceptions:</h2>
- <ul class="unstyled">
- <?php while ( $e ) : ?>
- <li>
- <h3><?= get_class( $e ) ?></h3>
- <dl>
- <dt>File:</dt>
- <dd>
- <pre class="prettyprint linenums"><?= $e->getFile() ?>:<?= $e->getLine() ?></pre>
- </dd>
- <dt>Message:</dt>
- <dd>
- <pre class="prettyprint linenums"><?= $e->getMessage() ?></pre>
- </dd>
- <dt>Stack trace:</dt>
- <dd>
- <pre class="prettyprint linenums"><?= $e->getTraceAsString() ?></pre>
- </dd>
- </dl>
- </li>
- <?php
- $e = $e->getPrevious();
- endwhile;
- ?>
- </ul>
- <?php endif; ?>
- <?php else: ?>
- <p>No Exception available</p>
- <?php endif ?>
- <?php endif ?>
|