aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-errors.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/synth-errors.adb')
-rw-r--r--src/synth/synth-errors.adb29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/synth/synth-errors.adb b/src/synth/synth-errors.adb
index a0b672770..795c0e1c4 100644
--- a/src/synth/synth-errors.adb
+++ b/src/synth/synth-errors.adb
@@ -17,20 +17,41 @@
-- along with this program. If not, see <gnu.org/licenses>.
package body Synth.Errors is
- procedure Error_Msg_Synth (Loc : Location_Type;
+ procedure Error_Msg_Netlist (Loc : Location_Type;
+ Msg : String;
+ Args : Earg_Arr := No_Eargs) is
+ begin
+ Report_Msg (Msgid_Error, Errorout.Elaboration,
+ +Loc, Msg, Args);
+ end Error_Msg_Netlist;
+
+ function To_Coord (N : Node) return Source_Coord_Type is
+ begin
+ return +Get_Location (N);
+ end To_Coord;
+
+ procedure Error_Msg_Synth (Inst : Synth_Instance_Acc;
+ Loc : Node;
Msg : String;
Arg1 : Earg_Type) is
begin
Report_Msg (Msgid_Error, Errorout.Elaboration,
- +Loc, Msg, (1 => Arg1));
+ To_Coord (Loc), Msg, (1 => Arg1));
+ if Inst /= null and then Debug_Handler /= null then
+ Debug_Handler (Inst, Loc);
+ end if;
end Error_Msg_Synth;
- procedure Error_Msg_Synth (Loc : Location_Type;
+ procedure Error_Msg_Synth (Inst : Synth_Instance_Acc;
+ Loc : Node;
Msg : String;
Args : Earg_Arr := No_Eargs) is
begin
Report_Msg (Msgid_Error, Errorout.Elaboration,
- +Loc, Msg, Args);
+ To_Coord (Loc), Msg, Args);
+ if Inst /= null and then Debug_Handler /= null then
+ Debug_Handler (Inst, Loc);
+ end if;
end Error_Msg_Synth;
procedure Warning_Msg_Synth (Warnid : Msgid_Warnings;