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

Stream cannot be written. More...

#include <HfstExceptionDefs.h>

Inheritance diagram for StreamCannotBeWrittenException:
HfstException

Additional Inherited Members

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

Detailed Description

Stream cannot be written.

Thrown by hfst::HfstOutputStream::operator<< and hfst::HfstTransducer::write_in_att_format

An example:

try {
  HfstTransducer tr("foo", FOMA_TYPE);
  HfstOutputStream out("testfile");
  out << tr;
} catch (StreamCannotBeWrittenException e) {
  fprintf(stderr, "ERROR: file cannot be written.\n");
}  

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