diff options
author | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-11-10 22:43:29 +0000 |
---|---|---|
committer | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-11-10 22:43:29 +0000 |
commit | 816c7efe7ada1554f0d62282517b6051724c7102 (patch) | |
tree | 17e7dce5a7731609844a5b966b879f30c8aafd05 /klm/lm/lm_exception.hh | |
parent | 47a656c0b6fdba8f91f2c5808234cbb1de682652 (diff) |
forgotten files
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@707 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'klm/lm/lm_exception.hh')
-rw-r--r-- | klm/lm/lm_exception.hh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/klm/lm/lm_exception.hh b/klm/lm/lm_exception.hh new file mode 100644 index 00000000..1216c4c7 --- /dev/null +++ b/klm/lm/lm_exception.hh @@ -0,0 +1,42 @@ +#ifndef LM_LM_EXCEPTION__ +#define LM_LM_EXCEPTION__ + +// Named to avoid conflict with util/exception.hh. + +#include "util/exception.hh" +#include "util/string_piece.hh" + +#include <exception> +#include <string> + +namespace lm { + +class LoadException : public util::Exception { + public: + virtual ~LoadException() throw(); + + protected: + LoadException() throw(); +}; + +class VocabLoadException : public LoadException { + public: + virtual ~VocabLoadException() throw(); + VocabLoadException() throw(); +}; + +class FormatLoadException : public LoadException { + public: + FormatLoadException() throw(); + ~FormatLoadException() throw(); +}; + +class SpecialWordMissingException : public VocabLoadException { + public: + explicit SpecialWordMissingException(StringPiece which) throw(); + ~SpecialWordMissingException() throw(); +}; + +} // namespace lm + +#endif // LM_LM_EXCEPTION |