wisc_db
invalid_record_exception.cpp
1 
8 #include "invalid_record_exception.h"
9 
10 #include <sstream>
11 #include <string>
12 
13 namespace wiscdb {
14 
16  const RecordId& rec_id, const PageId page_num)
17  : WiscDbException(""),
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 }
Definition: buffer.h:14
Identifier for a record in a page.
Definition: types.h:30
InvalidRecordException(const RecordId &rec_id, const PageId page_num)
std::uint32_t PageId
Identifier for a page in a file.
Definition: types.h:15
Base class for all WiscDB-specific exceptions.
SlotId slot_number
Definition: types.h:39
PageId page_number
Definition: types.h:34