blob: d375ca850b60719fc764b1b2d262f0d736f9f9a7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "errorpolicy.h"
#include <vespa/documentapi/messagebus/documentprotocol.h>
#include <vespa/messagebus/emptyreply.h>
#include <vespa/log/log.h>
LOG_SETUP(".documentapi.messagebus.policies.error_policy");
namespace documentapi {
ErrorPolicy::ErrorPolicy(const string &msg) :
_msg(msg)
{}
void
ErrorPolicy::select(mbus::RoutingContext &ctx)
{
ctx.setError(DocumentProtocol::ERROR_POLICY_FAILURE, _msg);
}
void
ErrorPolicy::merge(mbus::RoutingContext &)
{
LOG_ABORT("should not be reached");
}
}
|