mirror of
https://github.com/SophiaAtkinson/steamwidgets-web.git
synced 2025-06-27 06:07:40 -07:00
Better debug exception view
This commit is contained in:
@ -27,7 +27,7 @@ APP_NPMPACKAGEURL=""
|
|||||||
APP_EXAMPLE_APP=""
|
APP_EXAMPLE_APP=""
|
||||||
APP_EXAMPLE_SERVER=""
|
APP_EXAMPLE_SERVER=""
|
||||||
APP_EXAMPLE_USER=""
|
APP_EXAMPLE_USER=""
|
||||||
APP_EXAMPLE_WIDGET=""
|
APP_EXAMPLE_WORKSHOP=""
|
||||||
APP_EXAMPLE_GROUP=""
|
APP_EXAMPLE_GROUP=""
|
||||||
|
|
||||||
STEAM_API_KEY=""
|
STEAM_API_KEY=""
|
||||||
|
@ -9,23 +9,55 @@
|
|||||||
html, body {
|
html, body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: rgb(30, 30, 30);
|
margin: 0 auto;
|
||||||
color: rgb(100, 100, 100);
|
background-color: rgb(255, 255, 255);
|
||||||
|
color: rgb(0, 0, 0);
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_image {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
background-image: url('<?= asset('img/pattern.jpg')?>');
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
width: 30%;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ex_box {
|
.ex_box {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 98%;
|
display: inline-block;
|
||||||
height: auto;
|
width: 69%;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ex_header {
|
.ex_header_num {
|
||||||
|
position: relative;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
font-size: 5.0em;
|
||||||
|
color: rgb(215, 50, 50);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_header_text {
|
||||||
|
position: relative;
|
||||||
|
margin-top: -10px;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-size: 2.0em;
|
||||||
|
color: rgb(50, 50, 50);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_origin {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
color: rgb(121, 73, 68);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ex_msg {
|
.ex_msg {
|
||||||
@ -40,18 +72,43 @@
|
|||||||
color: rgb(128, 0, 0);
|
color: rgb(128, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ex_refresh {
|
||||||
|
position: relative;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
margin-top: 20px;
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
padding-left: 50px;
|
||||||
|
padding-right: 50px;
|
||||||
|
width: 51px;
|
||||||
|
border: 1px solid rgb(51, 63, 104);
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: rgb(45, 95, 245);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_refresh a {
|
||||||
|
color: rgb(235, 235, 235);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_refresh a:hover {
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
.ex_trace_box {
|
.ex_trace_box {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 35px;
|
margin-top: 35px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
margin-bottom: 35px;
|
margin-bottom: 35px;
|
||||||
border: 1px solid white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ex_trace_title {
|
.ex_trace_title {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
font-size: 1.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ex_trace_content {
|
.ex_trace_content {
|
||||||
@ -60,28 +117,88 @@
|
|||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
font-size: 1.2em;
|
font-size: 1.0em;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_trace_content_col_1 {
|
||||||
|
padding: 10px;
|
||||||
|
background-color: rgb(135, 135, 135);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_trace_content_col_2 {
|
||||||
|
padding: 10px;
|
||||||
|
background-color: rgb(200, 200, 200);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<div class="ex_image"></div>
|
||||||
|
|
||||||
<div class="ex_box">
|
<div class="ex_box">
|
||||||
<div class="ex_header">
|
<div class="ex_header_num">500</div>
|
||||||
<h1><strong>Exception</strong> at <?= $exception->getFile(); ?>:<?= $exception->getLine(); ?></h1>
|
|
||||||
|
<div class="ex_header_text">Internal Server Error</div>
|
||||||
|
|
||||||
|
<div class="ex_origin">
|
||||||
|
Exception at <strong><?= $exception->getFile(); ?>:<?= $exception->getLine(); ?></strong>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ex_msg">
|
<div class="ex_msg">
|
||||||
Reported error: <strong><?= $exception->getMessage(); ?></strong>
|
Reported error: <strong><?= $exception->getMessage(); ?></strong>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="ex_refresh">
|
||||||
|
<a href="javascript:void(0);" onclick="location.reload();">Refresh</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="ex_trace_box">
|
<div class="ex_trace_box">
|
||||||
<div class="ex_trace_title">
|
<div class="ex_trace_title">
|
||||||
Stack trace:
|
Stack trace:
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ex_trace_content">
|
<div class="ex_trace_content">
|
||||||
<?= preg_replace("/\n/", '<br>', $exception->getTraceAsString()); ?>
|
<?php
|
||||||
|
$stacktrace = $exception->getTrace();
|
||||||
|
$tableswitch = false;
|
||||||
|
$stackcounter = count($stacktrace) - 1;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php foreach ($stacktrace as $item) { ?>
|
||||||
|
<div class="ex_trace_content_col_<?= (($tableswitch) ? '1' : '2') ?>">
|
||||||
|
#<?= $stackcounter ?> <?= ((isset($item['file'])) ? $item['file'] : 'internal function') ?><?= (isset($item['line']) ? '(' . $item['line'] . ')' : '') ?>: <?= $item['function'] ?>
|
||||||
|
<?php if (count($item['args']) > 0) { ?>
|
||||||
|
(
|
||||||
|
<?php $argcnt = 0; ?>
|
||||||
|
<?php foreach ($item['args'] as $key => $arg) { ?>
|
||||||
|
<?php
|
||||||
|
if (gettype($arg) === 'object') {
|
||||||
|
echo get_class($arg);
|
||||||
|
} else if (gettype($arg) === 'array') {
|
||||||
|
echo 'array';
|
||||||
|
} else if (gettype($arg) === 'string') {
|
||||||
|
echo '\'' . $arg . '\'';
|
||||||
|
} else if (gettype($arg) === 'integer') {
|
||||||
|
echo 'int(' . $arg . ')';
|
||||||
|
} else if (gettype($arg) === 'boolean') {
|
||||||
|
echo 'bool(' . (($arg) ? 'true' : 'false') . ')';
|
||||||
|
} else if (gettype($arg) === 'double') {
|
||||||
|
echo 'double(' . $arg . ')';
|
||||||
|
} else {
|
||||||
|
echo gettype($arg);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?= (($argcnt <= count($item['args']) - 2) ? ', ' : '') ?>
|
||||||
|
<?php $argcnt++ ?>
|
||||||
|
<?php } ?>
|
||||||
|
)
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php $tableswitch = !$tableswitch; ?>
|
||||||
|
<?php $stackcounter--; ?>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
BIN
public/img/pattern.jpg
Normal file
BIN
public/img/pattern.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
Reference in New Issue
Block a user