Qt error handling improved.