OEThrow

This is the globally available error handler that is used to report all diagnostics generated by the OEChem, OESystem and OEPlatform libraries. The behavior of OEThrow may be customized via the various methods available to OEErrorHandler. For example, warning and error messages may be redirected to a file or string stream, instead of to OEPlatform::oeerr (the default).

Example

const string fname = "log.txt";
oeofstream errfs(fname);

if (!errfs)
  OEThrow.Fatal("Unable to create %s", fname.c_str());
OEThrow.SetOutputStream(errfs);
OEThrow.Warning("Sending warning to 'log.txt' file");