Skip to content

Commit

Permalink
Suppress exception messages in LineBuffer::GetLine
Browse files Browse the repository at this point in the history
These exceptions are used to communicate state to the caller, and should not be
treated as errors in common cases.
  • Loading branch information
qris committed Nov 17, 2017
1 parent fd1495a commit def9f9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/bbackupd/BackupDaemon.cpp
Expand Up @@ -2162,8 +2162,12 @@ void BackupDaemon::WaitOnCommandSocket(box_time_t RequiredDelay, bool &DoSyncFla
std::string command;
while(mapCommandSocketInfo->mapGetLine.get() != 0)
{
command = mapCommandSocketInfo->mapGetLine->GetLine(
false /* no preprocessing */, timeout);
{
HideExceptionMessageGuard hide_exceptions;
command = mapCommandSocketInfo->mapGetLine->GetLine(
false /* no preprocessing */, timeout);
}

BOX_TRACE("Received command '" << command << "' over command socket");

bool sendOK = false;
Expand Down
1 change: 1 addition & 0 deletions lib/bbstored/BBStoreDHousekeeping.cpp
Expand Up @@ -222,6 +222,7 @@ bool BackupStoreDaemon::CheckForInterProcessMsg(int AccountNum, int MaximumWaitT

try
{
HideExceptionMessageGuard hide_exceptions;
line = mInterProcessComms.GetLine(false /* no pre-processing */,
MaximumWaitTime);
}
Expand Down

0 comments on commit def9f9c

Please sign in to comment.