summaryrefslogtreecommitdiff
path: root/src/mongo/s/stale_exception.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-08-01 15:15:29 -0400
committerMathias Stearn <mathias@10gen.com>2017-08-16 16:28:02 -0400
commitcdf7aacb213c99d3ce620761ff46b030bbd7732d (patch)
treecdc32bf8c2899f88b2b3ea99c89e76bbc314f4ab /src/mongo/s/stale_exception.h
parent5a1b0681dcee481f631dc647000b895e20cc7cfd (diff)
downloadmongo-cdf7aacb213c99d3ce620761ff46b030bbd7732d.tar.gz
SERVER-30580 Make argument order consistently code then message
Diffstat (limited to 'src/mongo/s/stale_exception.h')
-rw-r--r--src/mongo/s/stale_exception.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/s/stale_exception.h b/src/mongo/s/stale_exception.h
index 5268da4c5ef..1661320db8e 100644
--- a/src/mongo/s/stale_exception.h
+++ b/src/mongo/s/stale_exception.h
@@ -46,13 +46,13 @@ public:
ChunkVersion received,
ChunkVersion wanted)
: AssertionException(
+ code,
str::stream() << raw << " ( ns : " << ns << ", received : " << received.toString()
<< ", wanted : "
<< wanted.toString()
<< ", "
<< (code == ErrorCodes::SendStaleConfig ? "send" : "recv")
- << " )",
- code),
+ << " )"),
_ns(ns),
_received(received),
_wanted(wanted) {}
@@ -60,6 +60,7 @@ public:
/** Preferred if we're rebuilding this from a thrown exception */
StaleConfigException(const std::string& raw, int code, const BSONObj& error)
: AssertionException(
+ code,
str::stream() << raw << " ( ns : " << (error["ns"].type() == String
? error["ns"].String()
: std::string("<unknown>"))
@@ -69,8 +70,7 @@ public:
<< ChunkVersion::fromBSON(error, "vWanted").toString()
<< ", "
<< (code == ErrorCodes::SendStaleConfig ? "send" : "recv")
- << " )",
- code),
+ << " )"),
// For legacy reasons, we may not always get a namespace here
_ns(error["ns"].type() == String ? error["ns"].String() : ""),
_received(ChunkVersion::fromBSON(error, "vReceived")),
@@ -81,7 +81,7 @@ public:
* stale config exceptions in a map and this requires a default constructor.
*/
StaleConfigException()
- : AssertionException("initializing empty stale config exception object", 0) {}
+ : AssertionException(0, "initializing empty stale config exception object") {}
virtual ~StaleConfigException() throw() {}