From 3862da0e1ff79062b5fe615568f47957b40d0e99 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 2 Sep 2017 16:23:14 +0200 Subject: [PATCH] throw exception in nice_die during tests Exits during testing will break the whole test suite. It makes more sense to throw an exception in that case. The exception's stack trace will help to debug the actual problem --- inc/init.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/init.php b/inc/init.php index edfbbecff..ba6743f95 100644 --- a/inc/init.php +++ b/inc/init.php @@ -527,6 +527,9 @@ function nice_die($msg){ EOT; + if(defined('DOKU_UNITTEST')) { + throw new RuntimeException('nice_die: '.$msg); + } exit(1); }