00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 #ifndef TOOL_EXCEPTIONS_HH_
00023 # define TOOL_EXCEPTIONS_HH_
00024 
00025 # include <stdexcept>
00026 # include <string>
00027 
00028 namespace wpl
00029 {
00030 
00031   namespace tool
00032   {
00033 
00035     struct user_interruption: public std::runtime_error
00036     {
00037       user_interruption(const std::string&);
00038     };
00039 
00041     struct file_error: public std::runtime_error
00042     {
00043       file_error(const std::string&);
00044     };
00045 
00047     struct read_error: public file_error
00048     {
00049       read_error(const std::string&);
00050     };
00051 
00053     struct write_error: public file_error
00054     {
00055       write_error(const std::string&);
00056     };
00057 
00059     struct seek_error: public file_error
00060     {
00061       seek_error(const std::string&);
00062     };
00063 
00065     struct bad_file: public file_error
00066     {
00067       bad_file(const std::string&);
00068     };
00069 
00070   } 
00071 
00072 } 
00073 
00074 # include "exceptions.hxx"
00075 
00076 #endif // ! TOOL_EXCEPTIONS_HH_