BadgerDB
 All Classes Namespaces Functions Variables Typedefs Friends Pages
slot_in_use_exception.cpp
1 
8 #include "slot_in_use_exception.h"
9 
10 #include <sstream>
11 #include <string>
12 
13 namespace badgerdb {
14 
16  const SlotId slot_num)
17  : BadgerDbException(""),
18  page_number_(page_num),
19  slot_number_(slot_num) {
20  std::stringstream ss;
21  ss << "Attempt to insert data to a slot that is currently in use."
22  << " Page: " << page_number_ << " Slot: " << slot_number_;
23  message_.assign(ss.str());
24 }
25 
26 }
Base class for all BadgerDB-specific exceptions.
std::uint32_t PageId
Identifier for a page in a file.
Definition: types.h:15
SlotInUseException(const PageId page_num, const SlotId slot_num)
std::uint16_t SlotId
Identifier for a slot in a page.
Definition: types.h:20