aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt/grt-errors.adb
diff options
context:
space:
mode:
authorBrian Drummond <brian@shapes.demon.co.uk>2017-10-05 19:19:01 +0100
committerTristan Gingold <tgingold@free.fr>2017-10-06 20:40:30 +0200
commit3ed10bea5275a9a0f8d6cc6c13b90bc02cb42d75 (patch)
treec419fba15feb91741e0a24fac82805a0176a566c /src/grt/grt-errors.adb
parentda6dd57e9e5ee865cbd0cc9246eebcad957adae6 (diff)
downloadghdl-3ed10bea5275a9a0f8d6cc6c13b90bc02cb42d75.tar.gz
ghdl-3ed10bea5275a9a0f8d6cc6c13b90bc02cb42d75.tar.bz2
ghdl-3ed10bea5275a9a0f8d6cc6c13b90bc02cb42d75.zip
Improved error reporting, Issue #26
Diffstat (limited to 'src/grt/grt-errors.adb')
-rw-r--r--src/grt/grt-errors.adb14
1 files changed, 14 insertions, 0 deletions
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);