aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/vespa/document/util/bufferexceptions.h
blob: 6fc8e570ecabc1fde505c174a5af295acc7ab1fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <vespa/vespalib/util/exceptions.h>
#include <memory>

namespace document {

class BufferOutOfBoundsException : public vespalib::IoException {
    static vespalib::string createMessage(size_t pos, size_t len);
public:
    BufferOutOfBoundsException(size_t pos, size_t len,
                               const vespalib::string& location = "");

    VESPA_DEFINE_EXCEPTION_SPINE(BufferOutOfBoundsException)
};

}