diff --git a/bhl.inc.php b/bhl.inc.php index e38b322..07dd12b 100644 --- a/bhl.inc.php +++ b/bhl.inc.php @@ -273,6 +273,7 @@ function bhl_handle_error_result(array $ret_out, $err_file, $exit = true) $history = array(); $err_lines = file($err_file); + $err_count = 0; foreach($err_lines as $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])) continue; $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)) stderr(bhl_show_position($jerr->line, $jerr->column, file($file)) . "\n"); }