BadgerDB
 All Classes Namespaces Functions Variables Typedefs Friends Pages
invalid_page_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 
25  public:
33  InvalidPageException(const PageId requested_number,
34  const std::string& file);
35 
40  virtual ~InvalidPageException() throw() {}
41 
45  virtual PageId page_number() const { return page_number_; }
46 
50  virtual const std::string& filename() const { return filename_; }
51 
52  protected:
57 
61  const std::string filename_;
62 };
63 
64 }
Base class for all BadgerDB-specific exceptions.
std::uint32_t PageId
Identifier for a page in a file.
Definition: types.h:15
An exception that is thrown when an attempt is made to access an invalid page in a file...
virtual PageId page_number() const
InvalidPageException(const PageId requested_number, const std::string &file)
virtual const std::string & filename() const