Input: Further small changes to error handling

Calling Error() in an input reader now automatically will disable the
reader and return a failure in the Update/Heartbeat calls.

Also adds more tests.

Addresses BIT-1181
This commit is contained in:
Johanna Amann 2016-07-25 15:35:46 -07:00
parent 6b9abe85a7
commit c8e1a39758
7 changed files with 89 additions and 7 deletions

View file

@ -191,6 +191,16 @@ public:
void Info(const char* msg) override;
void Warning(const char* msg) override;
/**
* Reports an error in the child thread. For input readers, it is assumed,
* that Info and Warnings do not cause the read operation to fail (they might
* signal that, e.g., a single line was ignored).
*
* It is assumed that Errors are not recoverable. Calling the Error function
* will return the error back to scriptland and also *automatically* causes
* the current reader to be disabled and torn down.
*/
void Error(const char* msg) override;
protected: