mirror of
https://github.com/daledavies/jump.git
synced 2026-02-19 12:56:49 +01:00
Improve error handling and add detailed debugging option
This commit is contained in:
32
jumpapp/classes/Debugger/JumpConfigPanel.php
Normal file
32
jumpapp/classes/Debugger/JumpConfigPanel.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* ██ ██ ██ ███ ███ ██████
|
||||
* ██ ██ ██ ████ ████ ██ ██
|
||||
* ██ ██ ██ ██ ████ ██ ██████
|
||||
* ██ ██ ██ ██ ██ ██ ██ ██
|
||||
* █████ ██████ ██ ██ ██
|
||||
*
|
||||
* @author Dale Davies <dale@daledavies.co.uk>
|
||||
* @copyright Copyright (c) 2023, Dale Davies
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
namespace Jump\Debugger;
|
||||
|
||||
class JumpConfigPanel {
|
||||
public static function panel(?\Throwable $e) {
|
||||
if ($e === null) {
|
||||
$content = '<pre>';
|
||||
foreach ((new \Jump\Config())->get_all() as $param => $value) {
|
||||
$content .= '<b>'.$param.'</b> : '.$value.'<br>';
|
||||
}
|
||||
$content .= '</pre>';
|
||||
return [
|
||||
'tab' => 'Jump Config',
|
||||
'panel' => $content,
|
||||
'bottom' => true
|
||||
];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user