aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/vespa/document/util/bufferexceptions.h
blob: 7394f09ac40d83ac0f71c09f7319d38c9a9d194c (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.
#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)
};

}