Introduce new I/O errors and enhanced it implementation


Instead of a single I/O error type IoError introduced new errors
WriteError, ReadError and ResourceError.

WriteError - occurs when a write operation is failed.

ReadError - occurs when a read operation is failed.

ResourceError - is a critical error. Occur when the operation is the
I/O in a non-existent or invalid device handle. Also, this error
indicates the sudden removal of the device from the system,
for example, when pulled out already open USB/Serial converter.

When an ResourceError occurs the user must close the device by close()
method, otherwise it will lead to an infinite trigger a I/O notifiers
(at least on *nix platform).

Checked on Windows and Linux with USB/Serial PL2303 converter.

Change-Id: I911fcb0072e194ea449a8a2db9115266ad40e74e
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
commitb412c0e0e90945b041dfd4615ae92fb95c67d000
parent7a21332e69bc0ea25d885333ca16e987437db0b1
authorDenis Shienkov <denis.shienkov@gmail.com>
committerDenis Shienkov <denis.shienkov@gmail.com>
commit timeTue, 5 Feb 2013 18:30:53 +0100