BadgerDB
 All Classes Namespaces Functions Variables Typedefs Friends Pages
insufficient_space_exception.h
1 
8 #pragma once
9 
10 #include <string>
11 
12 #include "badgerdb_exception.h"
13 #include "types.h"
14 
15 namespace badgerdb {
16 
22  public:
31  InsufficientSpaceException(const PageId page_num,
32  const std::size_t requested,
33  const std::size_t available);
34 
38  PageId page_number() const { return page_number_; }
39 
43  std::size_t space_requested() const { return space_requested_; }
44 
48  std::size_t space_available() const { return space_available_; }
49 
50  protected:
55 
59  const std::size_t space_requested_;
60 
64  const std::size_t space_available_;
65 };
66 
67 }
Base class for all BadgerDB-specific exceptions.
InsufficientSpaceException(const PageId page_num, const std::size_t requested, const std::size_t available)
std::uint32_t PageId
Identifier for a page in a file.
Definition: types.h:15
An exception that is thrown when a record is attempted to be inserted into a page that doesn't have s...