Showing error counter
This commit is contained in:
parent
57df25454c
commit
709d360e98
|
@ -273,6 +273,7 @@ function bhl_handle_error_result(array $ret_out, $err_file, $exit = true)
|
||||||
|
|
||||||
$history = array();
|
$history = array();
|
||||||
$err_lines = file($err_file);
|
$err_lines = file($err_file);
|
||||||
|
$err_count = 0;
|
||||||
foreach($err_lines as $err)
|
foreach($err_lines as $err)
|
||||||
{
|
{
|
||||||
$jerr = json_decode($err);
|
$jerr = json_decode($err);
|
||||||
|
@ -287,7 +288,8 @@ function bhl_handle_error_result(array $ret_out, $err_file, $exit = true)
|
||||||
if(isset($history[$file.$jerr->line]))
|
if(isset($history[$file.$jerr->line]))
|
||||||
continue;
|
continue;
|
||||||
$history[$file.$jerr->line] = true;
|
$history[$file.$jerr->line] = true;
|
||||||
stderr("BHL ERROR: " . $jerr->error . " \nin '$file', line {$jerr->line}\n");
|
++$err_count;
|
||||||
|
stderr("BHL ERROR (#$err_count): " . $jerr->error . " \nin '$file', line {$jerr->line}\n");
|
||||||
if(file_exists($file))
|
if(file_exists($file))
|
||||||
stderr(bhl_show_position($jerr->line, $jerr->column, file($file)) . "\n");
|
stderr(bhl_show_position($jerr->line, $jerr->column, file($file)) . "\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue