Skip to content

Commit 61c4941

Browse files
committed
[Intl] Enable error handler during compile
1 parent 861639f commit 61c4941

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Resources/bin/common.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ function get_icu_version_from_genrb($genrb)
6868
return $matches[1];
6969
}
7070

71+
error_reporting(E_ALL);
72+
73+
set_error_handler(function ($type, $msg, $file, $line) {
74+
throw new \ErrorException($msg, 0, $type, $file, $line);
75+
});
76+
7177
set_exception_handler(function (\Throwable $exception) {
7278
echo "\n";
7379

@@ -82,10 +88,7 @@ function get_icu_version_from_genrb($genrb)
8288
echo get_class($cause).': '.$cause->getMessage()."\n";
8389
echo "\n";
8490
echo $cause->getFile().':'.$cause->getLine()."\n";
85-
foreach ($cause->getTrace() as $trace) {
86-
echo $trace['file'].':'.$trace['line']."\n";
87-
}
88-
echo "\n";
91+
echo $cause->getTraceAsString()."\n";
8992

9093
$cause = $cause->getPrevious();
9194
$root = false;

0 commit comments

Comments
 (0)