- Improve ASSERT error handling.
+ Improve ASSERT error handling, safely check eval blocks, and convert $@
to $EVAL_ERROR
.
diff --git a/lib/pgBackRest/Archive.pm b/lib/pgBackRest/Archive.pm
index 87770766c..9ae3dbfdb 100644
--- a/lib/pgBackRest/Archive.pm
+++ b/lib/pgBackRest/Archive.pm
@@ -6,6 +6,7 @@ package pgBackRest::Archive;
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
+use English '-no_match_vars';
use Exporter qw(import);
our @EXPORT = qw();
@@ -518,24 +519,21 @@ sub getBackupInfoCheck
eval
{
$oBackupInfo = new pgBackRest::BackupInfo($oFile->pathGet(PATH_BACKUP_CLUSTER));
+ return true;
+ }
+ # If there is an error but it is not that the file is missing then confess
+ or do
+ {
+ if (!isException($EVAL_ERROR) || $EVAL_ERROR->code() != ERROR_PATH_MISSING)
+ {
+ confess $EVAL_ERROR;
+ }
};
- if ($@)
+ # Check that the stanza backup info is compatible with the current version of the database
+ # If not, an error will be thrown
+ if (defined($oBackupInfo))
{
- my $oMessage = $@;
-
- # If this is a backrest error but it is not that the file is missing then confess
- # else nothing to do so exit
- if (blessed($oMessage) && $oMessage->isa('pgBackRest::Common::Exception')
- && ($oMessage->code() != ERROR_PATH_MISSING))
- {
- confess $oMessage;
- }
- }
- else
- {
- # Check that the stanza backup info is compatible with the current version of the database
- # If not, an error will be thrown
$iDbHistoryId = $oBackupInfo->check($strDbVersion, $iControlVersion, $iCatalogVersion, $ullDbSysId);
}
}
@@ -952,6 +950,8 @@ sub xfer
}
else
{
+ my $oException = undef;
+
eval
{
# Start backup test point
@@ -1069,9 +1069,13 @@ sub xfer
# Remove the copied segment from the total size
$lFileSize -= $oManifestHash{name}{$strFile}{size};
}
- };
- my $oException = $@;
+ return true;
+ }
+ or do
+ {
+ $oException = $EVAL_ERROR;
+ };
# Create a stop file if the archive store exceeds the max even after xfer
if (optionTest(OPTION_ARCHIVE_MAX_MB))
@@ -1164,23 +1168,21 @@ sub check
# Clear any previous errors if we've found the archive.info
$iResult = 0;
- };
- if ($@)
- {
- my $oMessage = $@;
-
- # If this is a backrest error then capture the last code and message else confess
- if (blessed($oMessage) && $oMessage->isa('pgBackRest::Common::Exception'))
- {
- $iResult = $oMessage->code();
- $strResultMessage = $oMessage->message();
- }
- else
- {
- confess $oMessage;
- }
+ return true;
}
+ or do
+ {
+ # Confess unhandled errors
+ if (!isException($EVAL_ERROR))
+ {
+ confess $EVAL_ERROR;
+ }
+
+ # If this is a backrest error then capture the last code and message
+ $iResult = $EVAL_ERROR->code();
+ $strResultMessage = $EVAL_ERROR->message();
+ };
} while (!defined($strArchiveId) && waitMore($oWait));
# If able to get the archive id then check the archived WAL file with the time remaining
@@ -1189,24 +1191,21 @@ sub check
eval
{
$strArchiveFile = $self->walFileName($oFile, $strArchiveId, $strWalSegment, false, $iArchiveTimeout);
- };
-
- # If this is a backrest error then capture the code and message else confess
- if ($@)
- {
- my $oMessage = $@;
-
- # If a backrest exception then return the code else confess
- if (blessed($oMessage) && $oMessage->isa('pgBackRest::Common::Exception'))
- {
- $iResult = $oMessage->code();
- $strResultMessage = $oMessage->message();
- }
- else
- {
- confess $oMessage;
- }
+ return true;
}
+ # If this is a backrest error then capture the code and message else confess
+ or do
+ {
+ # Confess unhandled errors
+ if (!isException($EVAL_ERROR))
+ {
+ confess $EVAL_ERROR;
+ }
+
+ # If this is a backrest error then capture the last code and message
+ $iResult = $EVAL_ERROR->code();
+ $strResultMessage = $EVAL_ERROR->message();
+ };
}
# Reset the console logging
diff --git a/lib/pgBackRest/Backup.pm b/lib/pgBackRest/Backup.pm
index f2799d404..0321004cd 100644
--- a/lib/pgBackRest/Backup.pm
+++ b/lib/pgBackRest/Backup.pm
@@ -6,6 +6,7 @@ package pgBackRest::Backup;
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
+use English '-no_match_vars';
use Exporter qw(import);
use Fcntl 'SEEK_CUR';
@@ -732,7 +733,7 @@ sub process
# Check if an aborted backup exists for this stanza
if (-e $strBackupTmpPath)
{
- my $bUsable = false;
+ my $bUsable;
my $strReason = "resume is disabled";
my $oAbortedManifest;
@@ -811,7 +812,13 @@ sub process
{
$bUsable = true;
}
- };
+
+ return true;
+ }
+ or do
+ {
+ $bUsable = false;
+ }
}
# If the aborted backup is usable then clean it
diff --git a/lib/pgBackRest/Common/Exception.pm b/lib/pgBackRest/Common/Exception.pm
index 86ac5ccef..e2bed5822 100644
--- a/lib/pgBackRest/Common/Exception.pm
+++ b/lib/pgBackRest/Common/Exception.pm
@@ -7,6 +7,8 @@ use strict;
use warnings FATAL => qw(all);
use Carp qw(confess longmess);
+use Scalar::Util qw(blessed);
+
use Exporter qw(import);
our @EXPORT = qw();
@@ -98,8 +100,6 @@ use constant ERROR_TERM => ERROR_MIN
push @EXPORT, qw(ERROR_TERM);
use constant ERROR_FILE_WRITE => ERROR_MINIMUM + 39;
push @EXPORT, qw(ERROR_FILE_WRITE);
-use constant ERROR_UNHANDLED_EXCEPTION => ERROR_MINIMUM + 40;
- push @EXPORT, qw(ERROR_UNHANDLED_EXCEPTION);
use constant ERROR_PROTOCOL_TIMEOUT => ERROR_MINIMUM + 41;
push @EXPORT, qw(ERROR_PROTOCOL_TIMEOUT);
use constant ERROR_FEATURE_NOT_SUPPORTED => ERROR_MINIMUM + 42;
@@ -143,8 +143,10 @@ use constant ERROR_PROTOCOL_OUTPUT_REQUIRED => ERROR_MIN
use constant ERROR_LINK_OPEN => ERROR_MINIMUM + 61;
push @EXPORT, qw(ERROR_LINK_OPEN);
-use constant ERROR_INVALID_VALUE => ERROR_MAXIMUM - 1;
+use constant ERROR_INVALID_VALUE => ERROR_MAXIMUM - 2;
push @EXPORT, qw(ERROR_INVALID_VALUE);
+use constant ERROR_UNHANDLED => ERROR_MAXIMUM - 1;
+ push @EXPORT, qw(ERROR_UNHANDLED);
use constant ERROR_UNKNOWN => ERROR_MAXIMUM;
push @EXPORT, qw(ERROR_UNKNOWN);
@@ -158,10 +160,10 @@ sub new
my $strMessage = shift; # ErrorMessage
my $strTrace = shift; # Stack trace
- # if ($iCode < ERROR_MINIMUM || $iCode > ERROR_MAXIMUM)
- # {
- # $iCode = ERROR_INVALID_VALUE;
- # }
+ if ($iCode < ERROR_MINIMUM || $iCode > ERROR_MAXIMUM)
+ {
+ $iCode = ERROR_INVALID_VALUE;
+ }
# Create the class hash
my $self = {};
@@ -205,4 +207,18 @@ sub trace
return $self->{strTrace};
}
+####################################################################################################################################
+# isException
+#
+# Is this a structured exception?
+####################################################################################################################################
+sub isException
+{
+ my $oException = shift;
+
+ return defined($oException) && blessed($oException) && $oException->isa('pgBackRest::Common::Exception') ? 1 : 0;
+}
+
+push @EXPORT, qw(isException);
+
1;
diff --git a/lib/pgBackRest/Common/Exit.pm b/lib/pgBackRest/Common/Exit.pm
index 63b497971..ee2985d66 100644
--- a/lib/pgBackRest/Common/Exit.pm
+++ b/lib/pgBackRest/Common/Exit.pm
@@ -6,11 +6,11 @@ package pgBackRest::Common::Exit;
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
+use English '-no_match_vars';
use Exporter qw(import);
our @EXPORT = qw();
use File::Basename qw(dirname);
-use Scalar::Util qw(blessed);
use lib dirname($0) . '/../lib';
use pgBackRest::Common::Exception;
@@ -29,9 +29,9 @@ use constant SIGNAL_TERM => 'TERM';
####################################################################################################################################
# Hook important signals into exitSafe function
####################################################################################################################################
-$SIG{&SIGNAL_HUP} = sub {exitSafe(-1, SIGNAL_HUP)};
-$SIG{&SIGNAL_INT} = sub {exitSafe(-1, SIGNAL_INT)};
-$SIG{&SIGNAL_TERM} = sub {exitSafe(-1, SIGNAL_TERM)};
+$SIG{&SIGNAL_HUP} = sub {exitSafe(ERROR_TERM, undef, SIGNAL_HUP)};
+$SIG{&SIGNAL_INT} = sub {exitSafe(ERROR_TERM, undef, SIGNAL_INT)};
+$SIG{&SIGNAL_TERM} = sub {exitSafe(ERROR_TERM, undef, SIGNAL_TERM)};
####################################################################################################################################
# exitSafe
@@ -45,13 +45,15 @@ sub exitSafe
(
$strOperation,
$iExitCode,
- $strSignal
+ $oException,
+ $strSignal,
) =
logDebugParam
(
__PACKAGE__ . '::exitSafe', \@_,
- {name => 'iExitCode'},
- {name => 'strSignal', required => false}
+ {name => 'iExitCode', required => false},
+ {name => 'oException', required => false},
+ {name => 'strSignal', required => false},
);
commandStop();
@@ -63,26 +65,41 @@ sub exitSafe
eval
{
lockRelease(false);
- };
+ }
+ or do {};
- # Exit with code when defined
- if ($iExitCode != -1)
+ # If exit code is not defined then try to get it from the exception
+ if (!defined($iExitCode))
{
- exit $iExitCode;
+ # If a backrest exception
+ if (isException($oException))
+ {
+ $iExitCode = $oException->code();
+ }
+ else
+ {
+ $iExitCode = ERROR_UNHANDLED;
+
+ &log(
+ ERROR,
+ 'process terminated due to an unhandled exception' .
+ (defined($oException) ? ":\n${oException}" : ': [exception not defined]'),
+ $iExitCode);
+ }
+ }
+ elsif ($iExitCode == ERROR_TERM)
+ {
+ &log(ERROR, "process terminated on a ${strSignal} signal", ERROR_TERM);
}
- # Log error based on where the signal came from
- &log(
- ERROR,
- 'process terminated ' .
- (defined($strSignal) ? "on a ${strSignal} signal" : 'due to an unhandled exception'),
- defined($strSignal) ? ERROR_TERM : ERROR_UNHANDLED_EXCEPTION);
+ # Log return values if any
+ logDebugReturn
+ (
+ $strOperation,
+ {name => 'iExitCode', value => $iExitCode}
+ );
- # If terminated by a signal exit with ERROR_TERM
- exit ERROR_TERM if defined($strSignal);
-
- # Return from function and log return values if any
- return logDebugReturn($strOperation);
+ exit $iExitCode;
}
push @EXPORT, qw(exitSafe);
diff --git a/lib/pgBackRest/Config/Config.pm b/lib/pgBackRest/Config/Config.pm
index 192102ebe..c25c6ba6a 100644
--- a/lib/pgBackRest/Config/Config.pm
+++ b/lib/pgBackRest/Config/Config.pm
@@ -2252,13 +2252,18 @@ sub optionValidate
{
# Test that the string is a valid float or integer by adding 1 to it. It's pretty hokey but it works and it
# beats requiring Scalar::Util::Numeric to do it properly.
+ my $bError = false;
+
eval
{
my $strTest = $strValue + 1;
+ return true;
+ }
+ or do
+ {
+ $bError = true;
};
- my $bError = $@ ? true : false;
-
# Check that integers are really integers
if (!$bError && $oOptionRule{$strOption}{&OPTION_RULE_TYPE} eq OPTION_TYPE_INTEGER &&
(int($strValue) . 'S') ne ($strValue . 'S'))
diff --git a/lib/pgBackRest/File.pm b/lib/pgBackRest/File.pm
index fdf1dd0b3..f8c97d741 100644
--- a/lib/pgBackRest/File.pm
+++ b/lib/pgBackRest/File.pm
@@ -6,6 +6,7 @@ package pgBackRest::File;
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
+use English '-no_match_vars';
use Exporter qw(import);
our @EXPORT = qw();
@@ -15,7 +16,6 @@ use File::Copy qw(cp);
use File::Path qw(make_path remove_tree);
use File::stat;
use IO::Handle;
-use Scalar::Util qw(blessed);
use lib dirname($0) . '/../lib';
use pgBackRest::Common::Exception;
@@ -1568,17 +1568,17 @@ sub copy
{
$bResult = false;
}
- };
+ return true;
+ }
# If there is an error then evaluate
- if ($@)
+ or do
{
- my $oMessage = $@;
+ my $oException = $EVAL_ERROR;
# Ignore error if source file was missing and missing file exception was returned and bIgnoreMissingSource is set
- if ($bIgnoreMissingSource && $strRemote eq 'in' &&
- blessed($oMessage) && $oMessage->isa('pgBackRest::Common::Exception') &&
- $oMessage->code() == ERROR_FILE_MISSING)
+ if ($bIgnoreMissingSource && $strRemote eq 'in' && isException($oException) &&
+ $oException->code() == ERROR_FILE_MISSING)
{
close($hDestinationFile)
or confess &log(ERROR, "cannot close file ${strDestinationTmpOp}");
@@ -1587,8 +1587,8 @@ sub copy
return false, undef, undef;
}
- confess $oMessage;
- }
+ confess $oException;
+ };
}
}
# Else this is a local operation
diff --git a/lib/pgBackRest/Protocol/CommonMaster.pm b/lib/pgBackRest/Protocol/CommonMaster.pm
index dd78c98cc..a3f119df1 100644
--- a/lib/pgBackRest/Protocol/CommonMaster.pm
+++ b/lib/pgBackRest/Protocol/CommonMaster.pm
@@ -7,10 +7,10 @@ use parent 'pgBackRest::Protocol::Common';
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
+use English '-no_match_vars';
use File::Basename qw(dirname);
use Time::HiRes qw(gettimeofday);
-use Scalar::Util qw(blessed);
use lib dirname($0) . '/../lib';
use pgBackRest::Common::Exception;
@@ -111,32 +111,32 @@ sub close
eval
{
$self->cmdWrite('exit');
- };
-
- if ($@)
+ return true;
+ }
+ or do
{
- my $oMessage = $@;
+ my $oException = $EVAL_ERROR;
my $strError = 'unable to shutdown protocol';
my $strHint = 'HINT: the process completed successfully but protocol-timeout may need to be increased.';
- if (blessed($oMessage) && $oMessage->isa('pgBackRest::Common::Exception'))
+ if (isException($oException))
{
- $iExitStatus = $oMessage->code();
+ $iExitStatus = $oException->code();
}
else
{
- if (!defined($oMessage))
+ if (!defined($oException))
{
- $oMessage = 'unknown error';
+ $oException = 'unknown error';
}
$iExitStatus = ERROR_UNKNOWN;
}
&log(WARN,
- $strError . ($iExitStatus == ERROR_UNKNOWN ? '' : ' [' . $oMessage->code() . ']') . ': ' .
- ($iExitStatus == ERROR_UNKNOWN ? $oMessage : $oMessage->message()) . "\n${strHint}");
- }
+ $strError . ($iExitStatus == ERROR_UNKNOWN ? '' : ' [' . $oException->code() . ']') . ': ' .
+ ($iExitStatus == ERROR_UNKNOWN ? $oException : $oException->message()) . "\n${strHint}");
+ };
undef($self->{io});
$bClosed = true;
diff --git a/lib/pgBackRest/Protocol/CommonMinion.pm b/lib/pgBackRest/Protocol/CommonMinion.pm
index fb7a24b61..63e38162a 100644
--- a/lib/pgBackRest/Protocol/CommonMinion.pm
+++ b/lib/pgBackRest/Protocol/CommonMinion.pm
@@ -7,11 +7,8 @@ use parent 'pgBackRest::Protocol::Common';
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
+use English '-no_match_vars';
-use File::Basename qw(dirname);
-use Scalar::Util qw(blessed);
-
-use lib dirname($0) . '/../lib';
use pgBackRest::Common::Exception;
use pgBackRest::Common::Ini;
use pgBackRest::Common::Log;
@@ -120,30 +117,21 @@ sub binaryXferAbort
sub errorWrite
{
my $self = shift;
- my $oMessage = shift;
+ my $oException = shift;
my $iCode;
my $strMessage;
# If the message is blessed it may be a standard exception
- if (blessed($oMessage))
+ if (isException($oException))
{
- # Check if it is a standard exception
- if ($oMessage->isa('pgBackRest::Common::Exception'))
- {
- $iCode = $oMessage->code();
- $strMessage = $oMessage->message();
- }
- # Else terminate the process with an error
- else
- {
- confess &log(ERROR, 'unknown error object', ERROR_UNKNOWN);
- }
+ $iCode = $oException->code();
+ $strMessage = $oException->message();
}
# Else terminate the process with an error
else
{
- confess &log(ERROR, 'unknown error: ' . $oMessage, ERROR_UNKNOWN);
+ confess &log(ERROR, 'unknown error: ' . $oException, ERROR_UNKNOWN);
}
# Write the message text into protocol
@@ -274,13 +262,14 @@ sub process
confess "invalid command: ${strCommand}";
}
}
- };
- # Process errors
- if ($@)
- {
- $self->errorWrite($@);
+ return true;
}
+ # Process errors
+ or do
+ {
+ $self->errorWrite($EVAL_ERROR);
+ };
}
return 0;
diff --git a/lib/pgBackRest/Protocol/IO.pm b/lib/pgBackRest/Protocol/IO.pm
index 87a21b41b..8bc49217f 100644
--- a/lib/pgBackRest/Protocol/IO.pm
+++ b/lib/pgBackRest/Protocol/IO.pm
@@ -6,6 +6,7 @@ package pgBackRest::Protocol::IO;
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
+use English '-no_match_vars';
use Exporter qw(import);
our @EXPORT = qw();
@@ -552,16 +553,20 @@ sub waitPid
$strError .= $strLine;
}
- };
- if ($@ || !defined($strError))
- {
- my $strMessage = $@;
-
- $strError =
- 'no output from terminated process' .
- (defined($strMessage) && ${strMessage} ne '' ? ": ${strMessage}" : '');
+ return true;
}
+ or do
+ {
+ if (!defined($strError))
+ {
+ my $strException = $EVAL_ERROR;
+
+ $strError =
+ 'no output from terminated process' .
+ (defined($strException) && ${strException} ne '' ? ": ${strException}" : '');
+ }
+ };
}
$self->{pId} = undef;
diff --git a/test/expect/backup-archive-get-001.log b/test/expect/backup-archive-get-001.log
index ead74c3c9..5b8ec50b4 100644
--- a/test/expect/backup-archive-get-001.log
+++ b/test/expect/backup-archive-get-001.log
@@ -20,11 +20,12 @@ run 001 - rmt 0, cmp 0, exists 0
ERROR: [130]: archive.info does not exist but is required to get WAL segments
HINT: is archive_command configured in postgresql.conf?
HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme.
- DEBUG: Common::Exit::exitSafe(): iExitCode = 130, strSignal = [undef]
+ DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef]
INFO: archive-get stop
DEBUG: Protocol::Protocol::protocolDestroy(): iRemoteIdx = [undef], strRemoteType = [undef]
DEBUG: Protocol::Protocol::protocolDestroy=>: iExitStatus = 0
DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false
+ DEBUG: Common::Exit::exitSafe=>: iExitCode = 130
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
-----------------------------------------------------------------------
@@ -45,11 +46,12 @@ stop all stanzas (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf stop
------------------------------------------------------------------------------------------------------------------------------------
INFO: stop start: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo
- DEBUG: Common::Exit::exitSafe(): iExitCode = 0, strSignal = [undef]
+ DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef]
INFO: stop stop
DEBUG: Protocol::Protocol::protocolDestroy(): iRemoteIdx = [undef], strRemoteType = [undef]
DEBUG: Protocol::Protocol::protocolDestroy=>: iExitStatus = 0
DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false
+ DEBUG: Common::Exit::exitSafe=>: iExitCode = 0
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000090000000900000009 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG
------------------------------------------------------------------------------------------------------------------------------------
@@ -57,21 +59,23 @@ stop all stanzas (db-master host)
INFO: get WAL segment 000000090000000900000009
DEBUG: Archive->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG, strSourceArchive = 000000090000000900000009
ERROR: [137]: stop file exists for all stanzas
- DEBUG: Common::Exit::exitSafe(): iExitCode = 137, strSignal = [undef]
+ DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef]
INFO: archive-get stop
DEBUG: Protocol::Protocol::protocolDestroy(): iRemoteIdx = [undef], strRemoteType = [undef]
DEBUG: Protocol::Protocol::protocolDestroy=>: iExitStatus = 0
DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false
+ DEBUG: Common::Exit::exitSafe=>: iExitCode = 137
start all stanzas (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf start
------------------------------------------------------------------------------------------------------------------------------------
INFO: start start: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo
- DEBUG: Common::Exit::exitSafe(): iExitCode = 0, strSignal = [undef]
+ DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef]
INFO: start stop
DEBUG: Protocol::Protocol::protocolDestroy(): iRemoteIdx = [undef], strRemoteType = [undef]
DEBUG: Protocol::Protocol::protocolDestroy=>: iExitStatus = 0
DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false
+ DEBUG: Common::Exit::exitSafe=>: iExitCode = 0
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000090000000900000009 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG
------------------------------------------------------------------------------------------------------------------------------------
@@ -98,8 +102,9 @@ start all stanzas (db-master host)
DEBUG: Archive->walFileName=>: strWalFileName = [undef]
INFO: unable to find 000000090000000900000009 in the archive
DEBUG: Archive->get=>: iResult = 1
- DEBUG: Common::Exit::exitSafe(): iExitCode = 1, strSignal = [undef]
+ DEBUG: Common::Exit::exitSafe(): iExitCode = 1, oException = [undef], strSignal = [undef]
INFO: archive-get stop
DEBUG: Protocol::Protocol::protocolDestroy(): iRemoteIdx = [undef], strRemoteType = [undef]
DEBUG: Protocol::Protocol::protocolDestroy=>: iExitStatus = 0
DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false
+ DEBUG: Common::Exit::exitSafe=>: iExitCode = 1
diff --git a/test/expect/backup-archive-get-002.log b/test/expect/backup-archive-get-002.log
index 2b70a6001..491bc70d3 100644
--- a/test/expect/backup-archive-get-002.log
+++ b/test/expect/backup-archive-get-002.log
@@ -20,11 +20,12 @@ run 002 - rmt 0, cmp 0, exists 1
ERROR: [130]: archive.info does not exist but is required to get WAL segments
HINT: is archive_command configured in postgresql.conf?
HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme.
- DEBUG: Common::Exit::exitSafe(): iExitCode = 130, strSignal = [undef]
+ DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef]
INFO: archive-get stop
DEBUG: Protocol::Protocol::protocolDestroy(): iRemoteIdx = [undef], strRemoteType = [undef]
DEBUG: Protocol::Protocol::protocolDestroy=>: iExitStatus = 0
DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false
+ DEBUG: Common::Exit::exitSafe=>: iExitCode = 130
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
-----------------------------------------------------------------------
@@ -66,11 +67,12 @@ db-version="9.3"
DEBUG: Archive->walFileName=>: strWalFileName = 000000010000000100000001-1c7e00fd09b9dd11fc2966590b3e3274645dd031
DEBUG: File->copy(): bAppendChecksum =