2010-10-27 21:50:40 +04:00
|
|
|
#ifndef LM_LM_EXCEPTION__
|
|
|
|
#define LM_LM_EXCEPTION__
|
|
|
|
|
|
|
|
// Named to avoid conflict with util/exception.hh.
|
2010-09-10 04:36:07 +04:00
|
|
|
|
2010-09-28 20:26:55 +04:00
|
|
|
#include "util/exception.hh"
|
|
|
|
#include "util/string_piece.hh"
|
2010-09-10 04:36:07 +04:00
|
|
|
|
|
|
|
#include <exception>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace lm {
|
|
|
|
|
2010-12-08 06:15:37 +03:00
|
|
|
class ConfigException : public util::Exception {
|
|
|
|
public:
|
|
|
|
ConfigException() throw();
|
|
|
|
~ConfigException() throw();
|
|
|
|
};
|
|
|
|
|
2010-09-15 01:33:11 +04:00
|
|
|
class LoadException : public util::Exception {
|
2010-09-10 04:36:07 +04:00
|
|
|
public:
|
2010-09-15 01:33:11 +04:00
|
|
|
virtual ~LoadException() throw();
|
2010-09-10 04:36:07 +04:00
|
|
|
|
|
|
|
protected:
|
2010-09-15 01:33:11 +04:00
|
|
|
LoadException() throw();
|
2010-09-10 04:36:07 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class FormatLoadException : public LoadException {
|
|
|
|
public:
|
2010-09-15 01:33:11 +04:00
|
|
|
FormatLoadException() throw();
|
|
|
|
~FormatLoadException() throw();
|
2010-09-10 04:36:07 +04:00
|
|
|
};
|
|
|
|
|
2010-12-08 06:15:37 +03:00
|
|
|
class VocabLoadException : public LoadException {
|
|
|
|
public:
|
|
|
|
virtual ~VocabLoadException() throw();
|
|
|
|
VocabLoadException() throw();
|
|
|
|
};
|
|
|
|
|
2010-09-15 01:33:11 +04:00
|
|
|
class SpecialWordMissingException : public VocabLoadException {
|
2010-09-10 04:36:07 +04:00
|
|
|
public:
|
2010-09-15 01:33:11 +04:00
|
|
|
explicit SpecialWordMissingException(StringPiece which) throw();
|
|
|
|
~SpecialWordMissingException() throw();
|
2010-09-10 04:36:07 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace lm
|
|
|
|
|
2010-10-27 21:50:40 +04:00
|
|
|
#endif // LM_LM_EXCEPTION
|