File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -301,6 +301,12 @@ ts_debug_point_raise_error_if_enabled(const char *name)
301301 break ;
302302 }
303303
304+ /*
305+ * Drop error context, so that the error description doesn't inherit details
306+ * from the surrounding context (i.e. parse location).
307+ */
308+ error_context_stack = NULL ;
309+
304310 ereport (ERROR ,
305311 (errcode (ERRCODE_TRIGGERED_ACTION_EXCEPTION ),
306312 errmsg ("error injected at debug point '%s'" , point .name )));
@@ -338,6 +344,13 @@ ts_debug_point_raise_error_oneshot(const char *name)
338344 }
339345
340346 debug_point_release (& point );
347+
348+ /*
349+ * Drop error context, so that the error description doesn't inherit details
350+ * from the surrounding context (i.e. parse location).
351+ */
352+ error_context_stack = NULL ;
353+
341354 ereport (ERROR ,
342355 (errcode (ERRCODE_TRIGGERED_ACTION_EXCEPTION ),
343356 errmsg ("error injected at debug point '%s'" , point .name )));
You can’t perform that action at this time.
0 commit comments