aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2020-04-23 00:29:34 +0200
committerVincent Peugnet <33429034+vincent-peugnet@users.noreply.github.com>2020-04-25 17:38:14 +0200
commit94714d94f82d49cf8536d16505c47aceffb01e91 (patch)
treeae12d092fe5e4f4e97f431fe0a24295769380822 /index.php
parentdf545ce931b32d340e40831d0c3afbc6eabda29d (diff)
downloadwcms-94714d94f82d49cf8536d16505c47aceffb01e91.tar.gz
wcms-94714d94f82d49cf8536d16505c47aceffb01e91.zip
feat: warning, info & debug directly a throwable
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/index.php b/index.php
index fb05952..230b0e6 100644
--- a/index.php
+++ b/index.php
@@ -7,7 +7,11 @@ session_start();
require('./vendor/autoload.php');
-Logger::init('w_error.log', 2);
+try {
+ Logger::init('w_error.log', 2);
+} catch (Throwable $e) {
+ die('Unable to init logs: ' . $e->getMessage());
+}
$app = new Wcms\Application();
$app->wakeup();
@@ -33,6 +37,6 @@ try {
if (isreportingerrors()) {
Sentry\captureException($e);
}
- Logger::exception($e, true);
+ Logger::errorex($e, true);
echo '<h1>⚠ Woops ! There is a little problem : </h1>', $e->getMessage(), "\n";
}