index 853c2e0709ed92f92c02937db118c9ff6be1ad14..47412a831f096acb84c84fb09ee577820d479766 100644 (file)
@@ -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)
/*