10000 Improve error messages · jsxtech/arangodb@60bca78 · GitHub
[go: up one dir, main page]

Skip to content

Commit 60bca78

Browse files
author
Andreas Streichardt
committed
Improve error messages
1 parent 98c2a71 commit 60bca78

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

arangod/Replication/InitialSyncer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ class InitialSyncer : public Syncer {
105105
return _processedCollections;
106106
}
107107

108+
std::string progress() { return _progress; }
109+
108110
private:
109111
//////////////////////////////////////////////////////////////////////////////
110112
/// @brief set a progress message

arangod/V8Server/v8-replication.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,10 @@ static void JS_SynchronizeReplication(
376376

377377
if (res != TRI_ERROR_NO_ERROR) {
378378
if (errorMsg.empty()) {
379-
TRI_V8_THROW_EXCEPTION_MESSAGE(res, "cannot sync from remote endpoint");
379+
TRI_V8_THROW_EXCEPTION_MESSAGE(res, "cannot sync from remote endpoint. last progress message was '" + syncer.progress() + "'");
380380
} else {
381381
TRI_V8_THROW_EXCEPTION_MESSAGE(
382-
res, "cannot sync from remote endpoint: " + errorMsg);
382+
res, "cannot sync from remote endpoint: " + errorMsg + ". last progress message was '" + syncer.progress() + "'");
383383
}
384384
}
385385

0 commit comments

Comments
 (0)
0