BadgerDB
 All Classes Namespaces Functions Variables Typedefs Friends Pages
invalid_record_exception.cpp
1 
8 #include "invalid_record_exception.h"
9 
10 #include <sstream>
11 #include <string>
12 
13 namespace badgerdb {
14 
16  const RecordId& rec_id, const PageId page_num)
17  : BadgerDbException(""),
18  record_id_(rec_id),
19  page_number_(page_num) {
20  std::stringstream ss;
21  ss << "Request made for an invalid record."
22  << " Record {page=" << record_id_.page_number
23  << ", slot=" << record_id_.slot_number
24  << "} from page " << page_number_;
25  message_.assign(ss.str());
26 }
27 
28 }
Base class for all BadgerDB-specific exceptions.
std::uint32_t PageId
Identifier for a page in a file.
Definition: types.h:15
SlotId slot_number
Definition: types.h:39
InvalidRecordException(const RecordId &rec_id, const PageId page_num)
PageId page_number
Definition: types.h:34
Identifier for a record in a page.
Definition: types.h:30