Added error reporting interface

Feature is not ready, but the programming interfaces (SetErrors, GetErrors) are there