aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/elog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/utils/elog.h')
-rw-r--r--src/include/utils/elog.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index 853c2e0709e..47412a831f0 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -338,14 +338,16 @@ extern PGDLLIMPORT ErrorContextCallback *error_context_stack;
} \
else \
_do_rethrow = true; \
- {
+ { \
+ PG_exception_stack = _save_exception_stack; \
+ error_context_stack = _save_context_stack
#define PG_END_TRY() \
} \
- PG_exception_stack = _save_exception_stack; \
- error_context_stack = _save_context_stack; \
if (_do_rethrow) \
PG_RE_THROW(); \
+ PG_exception_stack = _save_exception_stack; \
+ error_context_stack = _save_context_stack; \
} while (0)
/*