@@ -192,13 +192,27 @@ public:
192192 err.traces .push_front (trace);
193193 }
194194
195+ /* *
196+ * Prepends an item to the error trace, as is usual for extra context.
197+ *
198+ * @param pos Nullable source position to put in trace item
199+ * @param fs Format string, see `HintFmt`
200+ * @param args... Format string arguments.
201+ */
195202 template <typename ... Args>
196- void addTrace (std::shared_ptr<const Pos> && e , std::string_view fs, const Args &... args)
203+ void addTrace (std::shared_ptr<const Pos> && pos , std::string_view fs, const Args &... args)
197204 {
198- addTrace (std::move (e ), HintFmt (std::string (fs), args...));
205+ addTrace (std::move (pos ), HintFmt (std::string (fs), args...));
199206 }
200207
201- void addTrace (std::shared_ptr<const Pos> && e, HintFmt hint, TracePrint print = TracePrint::Default);
208+ /* *
209+ * Prepends an item to the error trace, as is usual for extra context.
210+ *
211+ * @param pos Nullable source position to put in trace item
212+ * @param hint Formatted error message
213+ * @param print Optional, whether to always print (used by `addErrorContext`)
214+ */
215+ void addTrace (std::shared_ptr<const Pos> && pos, HintFmt hint, TracePrint print = TracePrint::Default);
202216
203217 bool hasTrace () const
204218 {
0 commit comments