Modified the exception and error messages so that they display nicely within the modal and on standalone pages

This commit is contained in:
alextselegidis 2021-11-17 09:26:13 +01:00
parent 9afe90f831
commit 8bad857edb
5 changed files with 237 additions and 127 deletions

View file

@ -1,48 +1,46 @@
<?php
/**
* @var string $heading
* @var string $message
*/
?>
<!doctype html>
<html lang="en">
<html lang="en" style="
height: 100%;
">
<head>
<title>404 Page Not Found</title>
<style type="text/css">
::selection {
background-color: #E13300;
color: white;
}
::moz-selection {
background-color: #E13300;
color: white;
}
::webkit-selection {
background-color: #E13300;
color: white;
}
body {
background-color: #fff;
margin: 40px;
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>404 Page Not Found | Easy!Appointments</title>
<style>
#error-container {
min-width: 450px;
max-width: 600px;
margin: auto;
border: 1px solid #D0D0D0;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
#error-container a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
#error-container h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
padding: 20px;
}
code {
#error-container code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
@ -50,24 +48,33 @@
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
padding: 20px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
-webkit-box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
#error-container p {
margin: 20px;
}
</style>
</head>
<body>
<div id="container">
<h1><?= $heading ?></h1>
<body style="
height: 100%;
padding: 0;
margin: 0;
display: flex;
">
<div id="error-container">
<h1>
<?= $heading ?>
</h1>
<?= $message ?>
<p>
<small>
Powered by
<a href="https://easyappointments.org">Easy!Appointments</a>
</small>
</p>
</div>
</body>
</html>

View file

@ -1,48 +1,46 @@
<?php
/**
* @var string $heading
* @var string $message
*/
?>
<!doctype html>
<html lang="en">
<html lang="en" style="
height: 100%;
">
<head>
<title>Database Error</title>
<style type="text/css">
::selection {
background-color: #E13300;
color: white;
}
::moz-selection {
background-color: #E13300;
color: white;
}
::webkit-selection {
background-color: #E13300;
color: white;
}
body {
background-color: #fff;
margin: 40px;
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Database Error | Easy!Appointments</title>
<style>
#error-container {
min-width: 450px;
max-width: 600px;
margin: auto;
border: 1px solid #D0D0D0;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
#error-container a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
#error-container h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
padding: 20px;
}
code {
#error-container code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
@ -50,24 +48,33 @@
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
padding: 20px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
-webkit-box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
#error-container p {
margin: 20px;
}
</style>
</head>
<body>
<div id="container">
<h1><?= $heading ?></h1>
<body style="
height: 100%;
padding: 0;
margin: 0;
display: flex;
">
<div id="error-container">
<h1>
<?= $heading ?>
</h1>
<?= $message ?>
<p>
<small>
Powered by
<a href="https://easyappointments.org">Easy!Appointments</a>
</small>
</p>
</div>
</body>
</html>

View file

@ -1,17 +1,61 @@
<?php defined('BASEPATH') or exit('No direct script access allowed') ?>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<?php
/**
* @var Throwable $exception
* @var string $message
*/
?>
<h4>An uncaught Exception was encountered</h4>
<div style="
border: 1px solid #dfdfdf;
margin: 0 0 10px 0;
padding: 15px;
font-size: 14px;
"
>
<p>Type: <?= get_class($exception) ?></p>
<p>Message: <?= $message ?></p>
<p>Filename: <?= $exception->getFile() ?></p>
<p>Line Number: <?= $exception->getLine() ?></p>
<h4>
An uncaught Exception was encountered
</h4>
<h6>
Type
</h6>
<p>
<?= get_class($exception) ?>
</p>
<h6>
Message
</h6>
<p>
<?= $message ?>
</p>
<h6>
Filename
</h6>
<p>
<?= $exception->getFile() ?>
</p>
<h6>
Line Number
</h6>
<p>
<?= $exception->getLine() ?>
</p>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
<p>Backtrace:</p>
<h6>
Backtrace
</h6>
<?php foreach ($exception->getTrace() as $error): ?>

View file

@ -1,48 +1,46 @@
<?php
/**
* @var string $heading
* @var string $message
*/
?>
<!doctype html>
<html lang="en">
<html lang="en" style="
height: 100%;
">
<head>
<title>Error</title>
<style type="text/css">
::selection {
background-color: #E13300;
color: white;
}
::moz-selection {
background-color: #E13300;
color: white;
}
::webkit-selection {
background-color: #E13300;
color: white;
}
body {
background-color: #fff;
margin: 40px;
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Error | Easy!Appointments</title>
<style>
#error-container {
min-width: 450px;
max-width: 600px;
margin: auto;
border: 1px solid #D0D0D0;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
#error-container a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
#error-container h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
padding: 20px;
}
code {
#error-container code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
@ -50,24 +48,33 @@
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
padding: 20px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
-webkit-box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
#error-container p {
margin: 20px;
}
</style>
</head>
<body>
<div id="container">
<h1><?= $heading ?></h1>
<body style="
height: 100%;
padding: 0;
margin: 0;
display: flex;
">
<div id="error-container">
<h1>
<?= $heading ?>
</h1>
<?= $message ?>
<p>
<small>
Powered by
<a href="https://easyappointments.org">Easy!Appointments</a>
</small>
</p>
</div>
</body>
</html>

View file

@ -1,8 +1,53 @@
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<?php
/**
* @var string $severity
* @var string $message
* @var string $filepath
* @var string $line
*/
?>
<p>Severity: <?= $severity ?></p>
<p>Message: <?= $message ?></p>
<p>Filename: <?= $filepath ?></p>
<p>Line Number: <?= $line ?></p>
<div style="
border: 1px solid #dfdfdf;
margin: 0 0 10px 0;
padding: 15px;
font-size: 14px;
"
>
<h4>
A PHP Error was encountered
</h4>
<h6>
Severity
</h6>
<p>
<?= $severity ?>
</p>
<h6>
Message
</h6>
<p>
<?= $message ?>
</p>
<h6>
Filename
</h6>
<p>
<?= $filepath ?>
</p>
<h6>
Line Number
</h6>
<p>
<?= $line ?>
</p>
</div>