mirror of
https://github.com/daledavies/jump.git
synced 2026-02-22 14:26:49 +01:00
Improve error handling and add detailed debugging option
This commit is contained in:
28
jumpapp/classes/Debugger/JumpVersionPanel.php
Normal file
28
jumpapp/classes/Debugger/JumpVersionPanel.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* ██ ██ ██ ███ ███ ██████
|
||||
* ██ ██ ██ ████ ████ ██ ██
|
||||
* ██ ██ ██ ██ ████ ██ ██████
|
||||
* ██ ██ ██ ██ ██ ██ ██ ██
|
||||
* █████ ██████ ██ ██ ██
|
||||
*
|
||||
* @author Dale Davies <dale@daledavies.co.uk>
|
||||
* @copyright Copyright (c) 2023, Dale Davies
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
namespace Jump\Debugger;
|
||||
|
||||
class JumpVersionPanel {
|
||||
public static function panel(?\Throwable $e) {
|
||||
if ($e === null) {
|
||||
$version = file_get_contents(__DIR__ . '/../../.jump-version');
|
||||
return [
|
||||
'tab' => 'Jump Version',
|
||||
'panel' => '<pre>'.$version.'</pre>',
|
||||
'bottom' => true
|
||||
];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user