00001 00008 #include "invalid_page_exception.h" 00009 00010 #include <sstream> 00011 #include <string> 00012 00013 namespace wiscdb { 00014 00015 InvalidPageException::InvalidPageException( 00016 const PageId requested_number, const std::string& file) 00017 : WiscDbException(""), 00018 page_number_(requested_number), 00019 filename_(file) { 00020 std::stringstream ss; 00021 ss << "Request made for an invalid page." 00022 << " Requested page " << page_number_ 00023 << " from file '" << filename_ << "'"; 00024 message_.assign(ss.str()); 00025 } 00026 00027 }