BadgerDB
 All Classes Namespaces Functions Variables Typedefs Friends Pages
invalid_page_exception.cpp
1 
8 #include "invalid_page_exception.h"
9 
10 #include <sstream>
11 #include <string>
12 
13 namespace badgerdb {
14 
16  const PageId requested_number, const std::string& file)
17  : BadgerDbException(""),
18  page_number_(requested_number),
19  filename_(file) {
20  std::stringstream ss;
21  ss << "Request made for an invalid page."
22  << " Requested page " << page_number_
23  << " from file '" << filename_ << "'";
24  message_.assign(ss.str());
25 }
26 
27 }
Base class for all BadgerDB-specific exceptions.
std::uint32_t PageId
Identifier for a page in a file.
Definition: types.h:15
InvalidPageException(const PageId requested_number, const std::string &file)