1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-02-21 19:48:29 +02:00

Use error*() getters where possible.

This makes it a little easier to change the underlying representation and ensures that the functions are used.
This commit is contained in:
David Steele 2022-12-31 11:57:06 +07:00
parent fa9d831f9f
commit 45ece13678

View File

@ -328,7 +328,7 @@ errorInternalCatch(const ErrorType *const errorTypeCatch, const bool fatalCatch)
void
errorInternalPropagate(void)
{
assert(errorContext.error.errorType != NULL);
assert(errorType() != NULL);
// Mark the error as uncaught
errorContext.tryList[errorContext.tryTotal].uncaught = true;
@ -391,7 +391,8 @@ errorInternalThrow(
// Else generate the stack trace for the error
else if (
stackTraceToZ(
stackTraceBuffer, sizeof(stackTraceBuffer), fileName, functionName, (unsigned int)fileLine) >= sizeof(stackTraceBuffer))
stackTraceBuffer, sizeof(stackTraceBuffer), errorFileName(), errorFunctionName(),
(unsigned int)fileLine) >= sizeof(stackTraceBuffer))
{
// Indicate that the stack trace was truncated
}