Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
src/kenlm/lm/lm_exception.hh
00001 #ifndef LM_LM_EXCEPTION_H
00002 #define LM_LM_EXCEPTION_H
00003 
00004 // Named to avoid conflict with util/exception.hh.
00005 
00006 #include "util/exception.hh"
00007 #include "util/string_piece.hh"
00008 
00009 #include <exception>
00010 #include <string>
00011 
00012 namespace lm {
00013 
00014 typedef enum {THROW_UP, COMPLAIN, SILENT} WarningAction;
00015 
00016 class ConfigException : public util::Exception {
00017   public:
00018     ConfigException() throw();
00019     ~ConfigException() throw();
00020 };
00021 
00022 class LoadException : public util::Exception {
00023    public:
00024       virtual ~LoadException() throw();
00025 
00026    protected:
00027       LoadException() throw();
00028 };
00029 
00030 class FormatLoadException : public LoadException {
00031   public:
00032     FormatLoadException() throw();
00033     ~FormatLoadException() throw();
00034 };
00035 
00036 class VocabLoadException : public LoadException {
00037   public:
00038     virtual ~VocabLoadException() throw();
00039     VocabLoadException() throw();
00040 };
00041 
00042 class SpecialWordMissingException : public VocabLoadException {
00043   public:
00044     explicit SpecialWordMissingException() throw();
00045     ~SpecialWordMissingException() throw();
00046 };
00047 
00048 } // namespace lm
00049 
00050 #endif // LM_LM_EXCEPTION