aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/docstore/summaryexceptions.cpp
blob: 175b5b7a3cea3978a118368511b488fc7d6e1aa3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "summaryexceptions.h"
#include <vespa/fastos/file.h>

using vespalib::IoException;
using vespalib::make_string;

namespace search {

SummaryException::SummaryException(vespalib::stringref msg,
                                   FastOS_FileInterface &file,
                                   vespalib::stringref location)
    : IoException(make_string("%s : Failing file = '%s'. Reason given by OS = '%s'",
                              vespalib::string(msg).c_str(), file.GetFileName(), file.getLastErrorString().c_str()),
                  getErrorType(file.GetLastError()), location)
{ }

}