Move the exception where it belongs...
...(or at least away from where it doesn't belong.
This commit is contained in:
parent
f0fbc8682a
commit
85fa800b74
3 changed files with 11 additions and 19 deletions
|
@ -74,14 +74,6 @@ line_source get_line_source(const std::vector<line_source>& line_src, int line)
|
|||
return res;
|
||||
}
|
||||
|
||||
} //end anon namespace
|
||||
|
||||
const char* io_exception::what() const throw() {
|
||||
return message.c_str();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
//this function takes a macro and parses it into the macro followed by its
|
||||
//arguments. Arguments are seperated by spaces, but an argument appearing inside
|
||||
//braces is treated as a single argument.
|
||||
|
|
|
@ -41,17 +41,6 @@ struct line_source
|
|||
|
||||
bool operator<(const line_source& a, const line_source& b);
|
||||
|
||||
//an exception object used when an IO error occurs
|
||||
struct io_exception : public std::exception {
|
||||
io_exception() {}
|
||||
io_exception(const std::string& msg) : message(msg) {}
|
||||
virtual ~io_exception() throw() {}
|
||||
|
||||
virtual const char* what() const throw();
|
||||
private:
|
||||
std::string message;
|
||||
};
|
||||
|
||||
struct preproc_define {
|
||||
preproc_define() {}
|
||||
explicit preproc_define(const std::string& val) : value(val) {}
|
||||
|
|
|
@ -18,6 +18,17 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
//an exception object used when an IO error occurs
|
||||
struct io_exception : public std::exception {
|
||||
io_exception() {}
|
||||
io_exception(const std::string& msg) : message(msg) {}
|
||||
virtual ~io_exception() throw() {}
|
||||
|
||||
virtual const char* what() const throw() { return message.c_str(); }
|
||||
private:
|
||||
std::string message;
|
||||
};
|
||||
|
||||
enum FILE_NAME_MODE { ENTIRE_FILE_PATH, FILE_NAME_ONLY };
|
||||
|
||||
//function which populates files with all the files and dirs
|
||||
|
|
Loading…
Add table
Reference in a new issue