* FlushErrorState --- flush the error state after error recovery * * This should be called by an error handler after it's done processing * the error; or as soon as it's done CopyErrorData, if it intends to * do stuff that is likely to provoke another error. You are not "out" of * the error subsystem until you have done this. */
| 1915 | * the error subsystem until you have done this. |
| 1916 | */ |
| 1917 | void |
| 1918 | FlushErrorState(void) |
| 1919 | { |
| 1920 | /* |
| 1921 | * Reset stack to empty. The only case where it would be more than one |
| 1922 | * deep is if we serviced an error that interrupted construction of |
| 1923 | * another message. We assume control escaped out of that message |
| 1924 | * construction and won't ever go back. |
| 1925 | */ |
| 1926 | errordata_stack_depth = -1; |
| 1927 | recursion_depth = 0; |
| 1928 | /* Delete all data in ErrorContext */ |
| 1929 | MemoryContextResetAndDeleteChildren(ErrorContext); |
| 1930 | } |
| 1931 | |
| 1932 | /* |
| 1933 | * ThrowErrorData --- report an error described by an ErrorData structure |
no outgoing calls