On 05/12/2018 08:57 AM, Thiago Macieira wrote:
On Friday, 11 May 2018 04:08:48 PDT alexander golks wrote:
It is not silent, you have the return value so you can detect when the
number of written bytes is not equal to the size of the data.
the error is 0. and errorString() is "no error", too.
so how to evaluate for error or no error?
No error. It just wrote less than what you supplied.
Which would be caused by an error, but he cannot find out what the error was. Any time a write comes up short, it is an error. Something ranging from annoying to bad happened. Annoying would be the device write cache got full. If he knows that is what happened he can compensate for this. Worst case, sleep for a second and write the rest. If the destination device is full or has went into read-only mode (annoying little problem with Linux and MicroSD caused by trying to write too much at once and then trying to read it back in before the write completes) he needs the application to inform someone a physical error requiring human interaction has occurred.

His point is that he has no reliable programmatic method of determining an appropriate course of action. With the current code base his only method of determining a human intervention needed error happened is to continually retry writing until the error occurs in the first chunk.

--
Roland Hughes, President
Logikal Solutions
(630)-205-1593

http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.johnsmith-book.com
http://www.logikalblog.com
http://www.interestingauthors.com/blog
http://lesedi.us/
http://onedollarcontentstore.com

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to