error handling of qwebpage