00001
00007
#ifndef FILESYSEXCEPTION_HPP_INCLUDED
00008
#define FILESYSEXCEPTION_HPP_INCLUDED
00009
00010
#include <stdexcept>
00011
00015 class FailedToOpenFile
00016 :
public std::runtime_error
00017 {
00018
public:
00019 FailedToOpenFile(std::string
const & file_name)
00020 : std::runtime_error(
00021 std::string("Failed to open file [")
00022 + file_name
00023 + "]\n")
00024 {
00025 }
00026 };
00027
00028
00033 class EmptyFileException
00034 :
public std::runtime_error
00035 {
00036
public:
00037 EmptyFileException(std::string
const & file_name)
00038 : std::runtime_error(
00039 std::string("File [")
00040 + file_name
00041 + "] is empty\n")
00042 {
00043 }
00044 };
00045
00046
#endif // defined FILESYSEXCEPTION_HPP_INCLUDED
00047