HFST - Helsinki Finite-State Transducer Technology - C++ API  version 3.9.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members
NotTransducerStreamException Struct Reference

The stream does not contain transducers. More...

#include <HfstExceptionDefs.h>

Inheritance diagram for NotTransducerStreamException:
HfstException

Additional Inherited Members

- Public Member Functions inherited from HfstException
HFSTDLL std::string operator() (void) const
 Get the error message. More...
 

Detailed Description

The stream does not contain transducers.

Thrown by hfst::HfstTransducer(const hfst::HfstInputStream&) hfst::HfstInputStream() hfst::HfstInputStream(const std::string&)

An example. The file "foofile" contains

This is a text file.
Here is another line.
The file ends here.

When we try to read it, an exception will be thrown:

try {
  HfstInputStream in("foofile");
} catch (NotTransducerStreamException e) {
  fprintf(stderr, "ERROR: file does not contain transducers.\n");
}  

The documentation for this struct was generated from the following file: