1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00
appwrite/app/views/general/error.phtml

50 lines
1.7 KiB
PHTML
Raw Normal View History

2019-05-09 18:54:39 +12:00
<?php
2021-07-18 06:59:54 +12:00
$development = $this->getParam('development', false);
2019-05-09 18:54:39 +12:00
$code = $this->getParam('code', 500);
$errorID = $this->getParam('errorID', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
$message = $this->getParam('message', '');
2021-07-18 06:59:54 +12:00
$trace = $this->getParam('trace', []);
2019-05-09 18:54:39 +12:00
$projectName = $this->getParam('projectName', '');
$projectURL = $this->getParam('projectURL', '');
?>
2020-04-09 01:15:04 +12:00
<section class="zone large margin-top padding">
2019-05-09 18:54:39 +12:00
<h1 class="margin-bottom">Error <?php echo $code; ?></h1>
<p><?php echo $message; ?></p>
<small>Error ID: <?php echo $errorID; ?></small>
2019-10-01 12:15:44 +13:00
<?php if (!empty($projectURL)): ?>
2019-05-09 18:54:39 +12:00
<hr class="margin-top margin-bottom" />
<p><a href="<?php echo $this->escape($projectURL); ?>" rel="noopener">Back to <?php echo $projectName; ?></a></p>
<?php endif; ?>
2021-07-18 06:59:54 +12:00
<?php if ($development): ?>
<div class="margin-top-xl">
<h2 class="margin-bottom-large">Error Trace</h2>
<?php foreach($trace as $log): ?>
<table class="margin-bottom-xl">
<?php foreach($log as $key => $value): ?>
<tr>
<td style="width: 120px"><?php echo $key; ?></td>
<td>
<?php if (is_array($value)): ?>
<?php var_dump($value); ?>
<?php else: ?>
<?php echo $value; ?>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php endforeach; ?>
</div>
<?php endif; ?>
2019-05-09 18:54:39 +12:00
</section>