diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-31 12:41:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-31 12:41:33 +0100 |
| commit | e3636c080d3d24471e85f519d69af4c11d5ecbd0 (patch) | |
| tree | f165bc8174ef9fd5668bf3667b167e8601ff9d90 /src/xml.cc | |
| parent | 32e93176fa91b215d68dee24e7887a21041da54c (diff) | |
Check sound; various fixups.
Diffstat (limited to 'src/xml.cc')
| -rw-r--r-- | src/xml.cc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,6 +1,7 @@ #include <sstream> #include <iostream> #include <boost/lexical_cast.hpp> +#include <boost/filesystem.hpp> #include <libxml++/libxml++.h> #include "xml.h" #include "exceptions.h" @@ -125,6 +126,10 @@ XMLNode::done () XMLFile::XMLFile (string file, string root_name) { + if (!filesystem::exists (file)) { + throw FileError ("XML file does not exist", file); + } + _parser = new xmlpp::DomParser; _parser->parse_file (file); if (!_parser) { |
