Skip to content
Snippets Groups Projects
Commit 6ec02023 authored by ilor's avatar ilor
Browse files

add exception scope info

parent 7947eb82
No related branches found
No related tags found
No related merge requests found
...@@ -16,9 +16,6 @@ set(LIBCORPUS2_DATA_DIR ...@@ -16,9 +16,6 @@ set(LIBCORPUS2_DATA_DIR
set(LIBCORPUS2_VERSION set(LIBCORPUS2_VERSION
"${corpus2_ver_major}.${corpus2_ver_minor}.${corpus2_ver_patch}") "${corpus2_ver_major}.${corpus2_ver_minor}.${corpus2_ver_patch}")
MESSAGE(${LIBCORPUS2_DATA_DIR})
configure_file(config_d.in include/libcorpus2/config_d.h) configure_file(config_d.in include/libcorpus2/config_d.h)
configure_file(version.in include/libcorpus2/version.h) configure_file(version.in include/libcorpus2/version.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
......
...@@ -12,6 +12,11 @@ namespace Corpus2 { ...@@ -12,6 +12,11 @@ namespace Corpus2 {
{ {
} }
std::string Corpus2Error::scope() const
{
return "Corpus2";
}
FileNotFound::FileNotFound(const std::string& filename, FileNotFound::FileNotFound(const std::string& filename,
const std::string& paths, const std::string& where) const std::string& paths, const std::string& where)
: Corpus2Error("File not found: " + filename), filename(filename), : Corpus2Error("File not found: " + filename), filename(filename),
...@@ -35,4 +40,5 @@ namespace Corpus2 { ...@@ -35,4 +40,5 @@ namespace Corpus2 {
return ss.str(); return ss.str();
} }
} /* end ns Corpus2 */ } /* end ns Corpus2 */
...@@ -20,6 +20,9 @@ public: ...@@ -20,6 +20,9 @@ public:
Corpus2Error(const std::string &what); Corpus2Error(const std::string &what);
~Corpus2Error() throw(); ~Corpus2Error() throw();
/// PwrNlpError override
std::string scope() const;
}; };
class FileNotFound : public Corpus2Error class FileNotFound : public Corpus2Error
......
...@@ -32,4 +32,9 @@ std::string PwrNlpError::info() const ...@@ -32,4 +32,9 @@ std::string PwrNlpError::info() const
return what(); return what();
} }
std::string PwrNlpError::scope() const
{
return "general";
}
} /* end ns PwrNlp */ } /* end ns PwrNlp */
...@@ -41,6 +41,9 @@ public: ...@@ -41,6 +41,9 @@ public:
/// verbose-info function /// verbose-info function
virtual std::string info() const; virtual std::string info() const;
/// scope information (subproject-like)
virtual std::string scope() const;
}; };
} /* end ns PwrNlp */ } /* end ns PwrNlp */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment