From bfdea3025535649cbdfe467fc40221362d1f9609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 27 Apr 2011 07:33:29 +0000 Subject: [PATCH] more error tracing; refs #22 --- swisssurfer/src/browser.hxx | 79 +---------- swisssurfer/src/downloadmanager.hxx | 79 ++++++++++- swisssurfer/src/swisssurfer_de.ts | 197 ++++++++++++++-------------- swisssurfer/src/swisssurfer_en.ts | 197 ++++++++++++++-------------- swisssurfer/src/swisssurfer_fr.ts | 197 ++++++++++++++-------------- swisssurfer/src/swisssurfer_it.ts | 197 ++++++++++++++-------------- 6 files changed, 477 insertions(+), 469 deletions(-) diff --git a/swisssurfer/src/browser.hxx b/swisssurfer/src/browser.hxx index c6d77be..bc043f3 100644 --- a/swisssurfer/src/browser.hxx +++ b/swisssurfer/src/browser.hxx @@ -124,79 +124,6 @@ class Browser: public QMainWindow, protected Ui::Browser { delete it->first; } } - - QString networkError(QNetworkReply::NetworkError err) { - LOG<Unknown network error (code: %1).") - .arg(err); - } - } //! Whitelisting bool check(QUrl page) { @@ -1047,7 +974,7 @@ class Browser: public QMainWindow, protected Ui::Browser { void unsupportedContent(QNetworkReply* reply) { LOG<header(QNetworkRequest::ContentTypeHeader).toString(); - LOG<<"Status:"<error()); + LOG<<"Status:"<<_downloadManager.networkError(reply->error()); if (reply->isFinished()) handleContent(reply); else @@ -1065,7 +992,7 @@ class Browser: public QMainWindow, protected Ui::Browser { .toString(); LOG<<"Content-Type:"<header(QNetworkRequest::ContentTypeHeader) .toString(); - LOG<<"Status:"<error()); + LOG<<"Status:"<<_downloadManager.networkError(reply->error()); LOG<<"URL:"<url().toString(); LOG<<"File:"<url().toLocalFile(); LOG<<"Path:"<url().path(); @@ -1169,7 +1096,7 @@ class Browser: public QMainWindow, protected Ui::Browser { // "

SSL Errors

" // "

    %3

") // .arg(tr("SSL Error")) -// .arg(networkError(reply->error())) +// .arg(_downloadManager.networkError(reply->error())) // .arg(e) // .arg(reply->url().toString()); // _errorUrl[sender()] = reply->url(); diff --git a/swisssurfer/src/downloadmanager.hxx b/swisssurfer/src/downloadmanager.hxx index d6bd225..a8f519c 100644 --- a/swisssurfer/src/downloadmanager.hxx +++ b/swisssurfer/src/downloadmanager.hxx @@ -6,6 +6,7 @@ // 45678901234567890123456789012345678901234567890123456789012345678901234567890 #include +#include #include #include @@ -24,6 +25,79 @@ class DownloadManager: public QObject { return *this; } + static QString networkError(QNetworkReply::NetworkError err) { + LOG<Unknown network error (code: %1).") + .arg(err); + } + } + Q_SIGNALS: void progress(qint64 done, qint64 total); @@ -77,7 +151,7 @@ class DownloadManager: public QObject { calcProgress(); } void error(QNetworkReply::NetworkError code) { - LOG; + LOG<<"Status:"< & errors) { LOG; + for (QList::const_iterator err(errors.begin()); + err!=errors.end(); ++err) + LOG<<"SSL-Error: "<errorString(); } void uploadProgress(qint64 bytesSent, qint64 bytesTotal) { //LOG< - - The connection to the proxy server was refused (the proxy server is not accepting requests). - the connection to the proxy timed out or the proxy did not reply in time to the request sent + + Checking: %1 + Opening: %1 - - The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). - the Network Access API cannot honor the request because the protocol is not known + + Reading: %1 + Reading: %1% - - Checking: %1 - Opening: %1 + + Zoom: %1% - - Reading: %1 - Reading: %1% + + Illegal URL: %1 - - Zoom: %1% + + Print Document - - Network connection successful, remote host can be reached. + + %1 - %2 + Back to %1 - %2 + statusbar actionBack_hovered %1=url %2=title - - The remote server refused the connection (the server is not accepting requests). + + Info: %1 - - The remote server closed the connection prematurely, before the entire reply was received and processed. + + done. - - The remote host name was not found (invalid hostname). + + page load error. - - The connection to the remote server timed out. + + %1 + statusbar for hovered link %1=url - - The operation was canceled via calls to abort() or close() before it was finished. + + Forbidden: %1 - - The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. + + Access Denied - - The proxy server closed the connection prematurely, before the entire reply was received and processed. + + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - - The proxy host name was not found (invalid proxy hostname). + + %1 - %2 + statusbar actionForward_hovered %1=url %2=title - - The connection to the proxy timed out or the proxy did not reply in time to the request sent. + + %1 - - The access to the remote content was denied (similar to HTTP error 401). + + Save File As ... - - The operation requested on the remote content is not permitted. + + authentication required - - The remote content was not found at the server (similar to HTTP error 404). + + ssl error + + + DownloadManager - - The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). + + Network connection successful, remote host can be reached. - - The Network Access API cannot honor the request because the protocol is not known. + + The remote server refused the connection (the server is not accepting requests). - - The requested operation is invalid for this protocol. + + The remote server closed the connection prematurely, before the entire reply was received and processed. - - An unknown network-related error was detected. + + The remote host name was not found (invalid hostname). - - An unknown proxy-related error was detected. + + The connection to the remote server timed out. - - An unknonwn error related to the remote content was detected. + + The operation was canceled via calls to abort() or close() before it was finished. - - A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). + + The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. - - <strong>Unknown network error (code: %1).</string> + + The connection to the proxy server was refused (the proxy server is not accepting requests). - - Illegal URL: %1 + + The proxy server closed the connection prematurely, before the entire reply was received and processed. - - Print Document + + The proxy host name was not found (invalid proxy hostname). - - %1 - %2 - Back to %1 - %2 - statusbar actionBack_hovered %1=url %2=title + + The connection to the proxy timed out or the proxy did not reply in time to the request sent. - - Info: %1 + + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). - - done. + + The access to the remote content was denied (similar to HTTP error 401). - - page load error. + + The operation requested on the remote content is not permitted. - - %1 - statusbar for hovered link %1=url + + The remote content was not found at the server (similar to HTTP error 404). - - Forbidden: %1 + + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - - Access Denied + + The Network Access API cannot honor the request because the protocol is not known. - - <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. + + The requested operation is invalid for this protocol. - - %1 - %2 - statusbar actionForward_hovered %1=url %2=title + + An unknown network-related error was detected. - - %1 + + An unknown proxy-related error was detected. - - Save File As ... + + An unknonwn error related to the remote content was detected. - - authentication required + + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - - ssl error + + <strong>Unknown network error (code: %1).</string> @@ -516,12 +517,12 @@ p, li { white-space: pre-wrap; } QMessageBox - + Wrong PIN - + Authentication failed, please try again. @@ -529,7 +530,7 @@ p, li { white-space: pre-wrap; } QObject - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text @@ -554,27 +555,27 @@ Environment: - + Cannot read PEM certificate from file: %1 - + Read PEM certificates from file: %1 - + Cannot read PEM RSA key from file: %1 - + Read private key from file: %1 - + Too few arguments. Try: %1 --help diff --git a/swisssurfer/src/swisssurfer_en.ts b/swisssurfer/src/swisssurfer_en.ts index 3be1949..155c90c 100644 --- a/swisssurfer/src/swisssurfer_en.ts +++ b/swisssurfer/src/swisssurfer_en.ts @@ -221,216 +221,217 @@ - - The connection to the proxy server was refused (the proxy server is not accepting requests). - the connection to the proxy timed out or the proxy did not reply in time to the request sent + + Checking: %1 + Opening: %1 - - The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). - the Network Access API cannot honor the request because the protocol is not known + + Reading: %1 + Reading: %1% - - Checking: %1 - Opening: %1 + + Zoom: %1% - - Reading: %1 - Reading: %1% + + Illegal URL: %1 - - Zoom: %1% + + Print Document - - Network connection successful, remote host can be reached. + + %1 - %2 + Back to %1 - %2 + statusbar actionBack_hovered %1=url %2=title - - The remote server refused the connection (the server is not accepting requests). + + Info: %1 - - The remote server closed the connection prematurely, before the entire reply was received and processed. + + done. - - The remote host name was not found (invalid hostname). + + page load error. - - The connection to the remote server timed out. + + %1 + statusbar for hovered link %1=url - - The operation was canceled via calls to abort() or close() before it was finished. + + Forbidden: %1 - - The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. + + Access Denied - - The proxy server closed the connection prematurely, before the entire reply was received and processed. + + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - - The proxy host name was not found (invalid proxy hostname). + + %1 - %2 + statusbar actionForward_hovered %1=url %2=title - - The connection to the proxy timed out or the proxy did not reply in time to the request sent. + + %1 - - The access to the remote content was denied (similar to HTTP error 401). + + Save File As ... - - The operation requested on the remote content is not permitted. + + authentication required - - The remote content was not found at the server (similar to HTTP error 404). + + ssl error + + + DownloadManager - - The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). + + Network connection successful, remote host can be reached. - - The Network Access API cannot honor the request because the protocol is not known. + + The remote server refused the connection (the server is not accepting requests). - - The requested operation is invalid for this protocol. + + The remote server closed the connection prematurely, before the entire reply was received and processed. - - An unknown network-related error was detected. + + The remote host name was not found (invalid hostname). - - An unknown proxy-related error was detected. + + The connection to the remote server timed out. - - An unknonwn error related to the remote content was detected. + + The operation was canceled via calls to abort() or close() before it was finished. - - A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). + + The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. - - <strong>Unknown network error (code: %1).</string> + + The connection to the proxy server was refused (the proxy server is not accepting requests). - - Illegal URL: %1 + + The proxy server closed the connection prematurely, before the entire reply was received and processed. - - Print Document + + The proxy host name was not found (invalid proxy hostname). - - %1 - %2 - Back to %1 - %2 - statusbar actionBack_hovered %1=url %2=title + + The connection to the proxy timed out or the proxy did not reply in time to the request sent. - - Info: %1 + + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). - - done. + + The access to the remote content was denied (similar to HTTP error 401). - - page load error. + + The operation requested on the remote content is not permitted. - - %1 - statusbar for hovered link %1=url + + The remote content was not found at the server (similar to HTTP error 404). - - Forbidden: %1 + + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - - Access Denied + + The Network Access API cannot honor the request because the protocol is not known. - - <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. + + The requested operation is invalid for this protocol. - - %1 - %2 - statusbar actionForward_hovered %1=url %2=title + + An unknown network-related error was detected. - - %1 + + An unknown proxy-related error was detected. - - Save File As ... + + An unknonwn error related to the remote content was detected. - - authentication required + + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - - ssl error + + <strong>Unknown network error (code: %1).</string> @@ -516,12 +517,12 @@ p, li { white-space: pre-wrap; } QMessageBox - + Wrong PIN - + Authentication failed, please try again. @@ -529,7 +530,7 @@ p, li { white-space: pre-wrap; } QObject - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text @@ -554,27 +555,27 @@ Environment: - + Cannot read PEM certificate from file: %1 - + Read PEM certificates from file: %1 - + Cannot read PEM RSA key from file: %1 - + Read private key from file: %1 - + Too few arguments. Try: %1 --help diff --git a/swisssurfer/src/swisssurfer_fr.ts b/swisssurfer/src/swisssurfer_fr.ts index 3be1949..155c90c 100644 --- a/swisssurfer/src/swisssurfer_fr.ts +++ b/swisssurfer/src/swisssurfer_fr.ts @@ -221,216 +221,217 @@ - - The connection to the proxy server was refused (the proxy server is not accepting requests). - the connection to the proxy timed out or the proxy did not reply in time to the request sent + + Checking: %1 + Opening: %1 - - The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). - the Network Access API cannot honor the request because the protocol is not known + + Reading: %1 + Reading: %1% - - Checking: %1 - Opening: %1 + + Zoom: %1% - - Reading: %1 - Reading: %1% + + Illegal URL: %1 - - Zoom: %1% + + Print Document - - Network connection successful, remote host can be reached. + + %1 - %2 + Back to %1 - %2 + statusbar actionBack_hovered %1=url %2=title - - The remote server refused the connection (the server is not accepting requests). + + Info: %1 - - The remote server closed the connection prematurely, before the entire reply was received and processed. + + done. - - The remote host name was not found (invalid hostname). + + page load error. - - The connection to the remote server timed out. + + %1 + statusbar for hovered link %1=url - - The operation was canceled via calls to abort() or close() before it was finished. + + Forbidden: %1 - - The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. + + Access Denied - - The proxy server closed the connection prematurely, before the entire reply was received and processed. + + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - - The proxy host name was not found (invalid proxy hostname). + + %1 - %2 + statusbar actionForward_hovered %1=url %2=title - - The connection to the proxy timed out or the proxy did not reply in time to the request sent. + + %1 - - The access to the remote content was denied (similar to HTTP error 401). + + Save File As ... - - The operation requested on the remote content is not permitted. + + authentication required - - The remote content was not found at the server (similar to HTTP error 404). + + ssl error + + + DownloadManager - - The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). + + Network connection successful, remote host can be reached. - - The Network Access API cannot honor the request because the protocol is not known. + + The remote server refused the connection (the server is not accepting requests). - - The requested operation is invalid for this protocol. + + The remote server closed the connection prematurely, before the entire reply was received and processed. - - An unknown network-related error was detected. + + The remote host name was not found (invalid hostname). - - An unknown proxy-related error was detected. + + The connection to the remote server timed out. - - An unknonwn error related to the remote content was detected. + + The operation was canceled via calls to abort() or close() before it was finished. - - A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). + + The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. - - <strong>Unknown network error (code: %1).</string> + + The connection to the proxy server was refused (the proxy server is not accepting requests). - - Illegal URL: %1 + + The proxy server closed the connection prematurely, before the entire reply was received and processed. - - Print Document + + The proxy host name was not found (invalid proxy hostname). - - %1 - %2 - Back to %1 - %2 - statusbar actionBack_hovered %1=url %2=title + + The connection to the proxy timed out or the proxy did not reply in time to the request sent. - - Info: %1 + + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). - - done. + + The access to the remote content was denied (similar to HTTP error 401). - - page load error. + + The operation requested on the remote content is not permitted. - - %1 - statusbar for hovered link %1=url + + The remote content was not found at the server (similar to HTTP error 404). - - Forbidden: %1 + + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - - Access Denied + + The Network Access API cannot honor the request because the protocol is not known. - - <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. + + The requested operation is invalid for this protocol. - - %1 - %2 - statusbar actionForward_hovered %1=url %2=title + + An unknown network-related error was detected. - - %1 + + An unknown proxy-related error was detected. - - Save File As ... + + An unknonwn error related to the remote content was detected. - - authentication required + + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - - ssl error + + <strong>Unknown network error (code: %1).</string> @@ -516,12 +517,12 @@ p, li { white-space: pre-wrap; } QMessageBox - + Wrong PIN - + Authentication failed, please try again. @@ -529,7 +530,7 @@ p, li { white-space: pre-wrap; } QObject - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text @@ -554,27 +555,27 @@ Environment: - + Cannot read PEM certificate from file: %1 - + Read PEM certificates from file: %1 - + Cannot read PEM RSA key from file: %1 - + Read private key from file: %1 - + Too few arguments. Try: %1 --help diff --git a/swisssurfer/src/swisssurfer_it.ts b/swisssurfer/src/swisssurfer_it.ts index 3be1949..155c90c 100644 --- a/swisssurfer/src/swisssurfer_it.ts +++ b/swisssurfer/src/swisssurfer_it.ts @@ -221,216 +221,217 @@ - - The connection to the proxy server was refused (the proxy server is not accepting requests). - the connection to the proxy timed out or the proxy did not reply in time to the request sent + + Checking: %1 + Opening: %1 - - The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). - the Network Access API cannot honor the request because the protocol is not known + + Reading: %1 + Reading: %1% - - Checking: %1 - Opening: %1 + + Zoom: %1% - - Reading: %1 - Reading: %1% + + Illegal URL: %1 - - Zoom: %1% + + Print Document - - Network connection successful, remote host can be reached. + + %1 - %2 + Back to %1 - %2 + statusbar actionBack_hovered %1=url %2=title - - The remote server refused the connection (the server is not accepting requests). + + Info: %1 - - The remote server closed the connection prematurely, before the entire reply was received and processed. + + done. - - The remote host name was not found (invalid hostname). + + page load error. - - The connection to the remote server timed out. + + %1 + statusbar for hovered link %1=url - - The operation was canceled via calls to abort() or close() before it was finished. + + Forbidden: %1 - - The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. + + Access Denied - - The proxy server closed the connection prematurely, before the entire reply was received and processed. + + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - - The proxy host name was not found (invalid proxy hostname). + + %1 - %2 + statusbar actionForward_hovered %1=url %2=title - - The connection to the proxy timed out or the proxy did not reply in time to the request sent. + + %1 - - The access to the remote content was denied (similar to HTTP error 401). + + Save File As ... - - The operation requested on the remote content is not permitted. + + authentication required - - The remote content was not found at the server (similar to HTTP error 404). + + ssl error + + + DownloadManager - - The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). + + Network connection successful, remote host can be reached. - - The Network Access API cannot honor the request because the protocol is not known. + + The remote server refused the connection (the server is not accepting requests). - - The requested operation is invalid for this protocol. + + The remote server closed the connection prematurely, before the entire reply was received and processed. - - An unknown network-related error was detected. + + The remote host name was not found (invalid hostname). - - An unknown proxy-related error was detected. + + The connection to the remote server timed out. - - An unknonwn error related to the remote content was detected. + + The operation was canceled via calls to abort() or close() before it was finished. - - A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). + + The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. - - <strong>Unknown network error (code: %1).</string> + + The connection to the proxy server was refused (the proxy server is not accepting requests). - - Illegal URL: %1 + + The proxy server closed the connection prematurely, before the entire reply was received and processed. - - Print Document + + The proxy host name was not found (invalid proxy hostname). - - %1 - %2 - Back to %1 - %2 - statusbar actionBack_hovered %1=url %2=title + + The connection to the proxy timed out or the proxy did not reply in time to the request sent. - - Info: %1 + + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). - - done. + + The access to the remote content was denied (similar to HTTP error 401). - - page load error. + + The operation requested on the remote content is not permitted. - - %1 - statusbar for hovered link %1=url + + The remote content was not found at the server (similar to HTTP error 404). - - Forbidden: %1 + + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - - Access Denied + + The Network Access API cannot honor the request because the protocol is not known. - - <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. + + The requested operation is invalid for this protocol. - - %1 - %2 - statusbar actionForward_hovered %1=url %2=title + + An unknown network-related error was detected. - - %1 + + An unknown proxy-related error was detected. - - Save File As ... + + An unknonwn error related to the remote content was detected. - - authentication required + + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - - ssl error + + <strong>Unknown network error (code: %1).</string> @@ -516,12 +517,12 @@ p, li { white-space: pre-wrap; } QMessageBox - + Wrong PIN - + Authentication failed, please try again. @@ -529,7 +530,7 @@ p, li { white-space: pre-wrap; } QObject - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text @@ -554,27 +555,27 @@ Environment: - + Cannot read PEM certificate from file: %1 - + Read PEM certificates from file: %1 - + Cannot read PEM RSA key from file: %1 - + Read private key from file: %1 - + Too few arguments. Try: %1 --help