mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
bc56270443
Summary: When compiling with Buck, it tries to create hardlink which are rightfully failing, but that error then triggers a spurious notification. For now, let's only notify the user on timeout, as these are very likely to be network issues. Reviewed By: kmancini Differential Revision: D25500364 fbshipit-source-id: 95b609ae901fa6207c8edba26cd8e6a21ddfe3ac
34 lines
891 B
C++
34 lines
891 B
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This software may be used and distributed according to the terms of the
|
|
* GNU General Public License version 2.
|
|
*/
|
|
|
|
#ifdef _WIN32
|
|
|
|
#include "eden/fs/prjfs/PrjfsRequestContext.h"
|
|
|
|
namespace facebook::eden {
|
|
void PrjfsRequestContext::handleException(
|
|
folly::Try<folly::Unit> try_,
|
|
Notifications* FOLLY_NULLABLE notifications) const {
|
|
XDCHECK(try_.hasException());
|
|
|
|
auto* exc = try_.tryGetExceptionObject<std::exception>();
|
|
sendError(exceptionToHResult(*exc));
|
|
|
|
if (auto* err = dynamic_cast<const folly::FutureTimeout*>(exc)) {
|
|
XLOG_EVERY_MS(WARN, 1000)
|
|
<< "Prjfs request timed out: " << folly::exceptionStr(*err);
|
|
if (notifications) {
|
|
notifications->showGenericErrorNotification(*err);
|
|
}
|
|
} else {
|
|
XLOG(DBG5) << folly::exceptionStr(*exc);
|
|
}
|
|
}
|
|
} // namespace facebook::eden
|
|
|
|
#endif
|