WiscDB
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends
insufficient_space_exception.cpp
00001 
00008 #include "insufficient_space_exception.h"
00009 
00010 #include <sstream>
00011 #include <string>
00012 
00013 namespace wiscdb {
00014 
00015 InsufficientSpaceException::InsufficientSpaceException(
00016     const PageId page_num, const std::size_t requested,
00017     const std::size_t available)
00018     : WiscDbException(""),
00019       page_number_(page_num),
00020       space_requested_(requested),
00021       space_available_(available) {
00022   std::stringstream ss;
00023   ss << "Insufficient space in page " << page_number_
00024      << "to hold record.  Requested: " << space_requested_ << " bytes."
00025      << " Available: " << space_available_ << " bytes.";
00026   message_.assign(ss.str());
00027 }
00028 
00029 }
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends