From 3ed10bea5275a9a0f8d6cc6c13b90bc02cb42d75 Mon Sep 17 00:00:00 2001 From: Brian Drummond Date: Thu, 5 Oct 2017 19:19:01 +0100 Subject: Improved error reporting, Issue #26 --- src/grt/grt-errors.adb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/grt/grt-errors.adb') diff --git a/src/grt/grt-errors.adb b/src/grt/grt-errors.adb index e9e2f54ad..51a50418c 100644 --- a/src/grt/grt-errors.adb +++ b/src/grt/grt-errors.adb @@ -254,6 +254,20 @@ package body Grt.Errors is Fatal_Error; end Error; + procedure Error (Str : String; + Filename : Ghdl_C_String; + Line : Ghdl_I32) is + begin + Error_H; + Put_Err (Str); + Put_Err (" at "); + Put_Err (Filename); + Put_Err (" line "); + Put_I32 (Error_Stream, Line); + Newline_Err; + Fatal_Error; + end Error; + procedure Info (Str : String) is begin Put_Err (Progname); -- cgit v1.2.3