1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00
appwrite/app/views/general/error.phtml
2021-07-17 21:59:54 +03:00

50 lines
1.7 KiB
PHTML

<?php
$development = $this->getParam('development', false);
$code = $this->getParam('code', 500);
$errorID = $this->getParam('errorID', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
$message = $this->getParam('message', '');
$trace = $this->getParam('trace', []);
$projectName = $this->getParam('projectName', '');
$projectURL = $this->getParam('projectURL', '');
?>
<section class="zone large margin-top padding">
<h1 class="margin-bottom">Error <?php echo $code; ?></h1>
<p><?php echo $message; ?></p>
<small>Error ID: <?php echo $errorID; ?></small>
<?php if (!empty($projectURL)): ?>
<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; ?>
<?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; ?>
</section>