artiso-solutions / CoVoX

MIT License
1 stars 1 forks source link

OnError event. #54

Closed tommasobertoni closed 3 years ago

tommasobertoni commented 3 years ago

Introduces the following interface:

public delegate void ErrorHandler(Exception ex);

public interface IExposeErrors
{
    event ErrorHandler OnError;
}

Beside validation errors (e.g. configuration, empty-commands), the engine should not break due to internal (temporary?) errors. The exceptions should instead surface to the engine, where the consumer can inspect them via the OnError event. Types implementing this interface: Translator, MultiLanguageTranslator, UnderstandingModule, RecognitionLoop, CovoxEngine.

Resolves #49.