diff options
Diffstat (limited to 'translate/grt/grt-lib.adb')
-rw-r--r-- | translate/grt/grt-lib.adb | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/translate/grt/grt-lib.adb b/translate/grt/grt-lib.adb index 65abdac5c..3b3f1f388 100644 --- a/translate/grt/grt-lib.adb +++ b/translate/grt/grt-lib.adb @@ -84,9 +84,31 @@ package body Grt.Lib is Do_Report ("report", Str, Severity, Loc); end Ghdl_Report; - procedure Ghdl_Program_Error is + procedure Ghdl_Program_Error (Filename : Ghdl_C_String; + Line : Ghdl_I32; + Code : Ghdl_Index_Type) + is begin - Error ("program error"); + case Code is + when 1 => + Error_C ("missing return in function"); + when 2 => + Error_C ("block already configured"); + when 3 => + Error_C ("bad configuration"); + when others => + Error_C ("unknown error code "); + Error_C (Integer (Code)); + end case; + Error_C (" at "); + if Filename = null then + Error_C ("*unknown*"); + else + Error_C (Filename); + end if; + Error_C (":"); + Error_C (Integer(Line)); + Error_E (""); end Ghdl_Program_Error; procedure Ghdl_Bound_Check_Failed_L0 (Number : Ghdl_Index_Type) is |