diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-07-09 06:51:41 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-07-09 06:51:41 (GMT) |
commit | 458c547aefcb529fe807a220109e2a7ce6bd9105 (patch) | |
tree | 767f21cf15b2bbc7338242b53acc7d86da1fe533 /tools | |
parent | 21b32a69fc4607e60677b978fbcdc6424cc4f63b (diff) | |
download | Qt-458c547aefcb529fe807a220109e2a7ce6bd9105.zip Qt-458c547aefcb529fe807a220109e2a7ce6bd9105.tar.gz Qt-458c547aefcb529fe807a220109e2a7ce6bd9105.tar.bz2 |
Improved cetest error reporting.
Now, if you try to run an unsigned test on a locked device,
you'll get:
"Error invoking qRemoteLaunch on \Windows\QtRemote.dll: Invalid Signature. (0x80090006)"
Instead of what you would previously get:
"Error: Could not execute target file"
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qtestlib/wince/cetest/activesyncconnection.cpp | 12 | ||||
-rw-r--r-- | tools/qtestlib/wince/cetest/remoteconnection.cpp | 4 |
2 files changed, 10 insertions, 6 deletions
diff --git a/tools/qtestlib/wince/cetest/activesyncconnection.cpp b/tools/qtestlib/wince/cetest/activesyncconnection.cpp index 0f98619..1080477 100644 --- a/tools/qtestlib/wince/cetest/activesyncconnection.cpp +++ b/tools/qtestlib/wince/cetest/activesyncconnection.cpp @@ -385,10 +385,14 @@ bool ActiveSyncConnection::execute(QString program, QString arguments, int timeo DWORD error = 0; HRESULT res = CeRapiInvoke(dllLocation.utf16(), functionName.utf16(), 0, 0, &outputSize, &output, &stream, 0); if (S_OK != res) { - if (S_OK != CeGetLastError()) - debugOutput(QString::fromLatin1("Error: Could not invoke method on QtRemote"),1); - else - debugOutput(QString::fromLatin1("Error: QtRemote return unexpectedly with error Code %1").arg(res), 1); + DWORD ce_error = CeGetLastError(); + if (S_OK != ce_error) { + qWarning("Error invoking %s on %s: %s", qPrintable(functionName), + qPrintable(dllLocation), strwinerror(ce_error).constData()); + } else { + qWarning("Error: %s on %s unexpectedly returned %d", qPrintable(functionName), + qPrintable(dllLocation), res); + } } else { DWORD written; int strSize = program.length(); diff --git a/tools/qtestlib/wince/cetest/remoteconnection.cpp b/tools/qtestlib/wince/cetest/remoteconnection.cpp index 75788e2..3d0c3f3 100644 --- a/tools/qtestlib/wince/cetest/remoteconnection.cpp +++ b/tools/qtestlib/wince/cetest/remoteconnection.cpp @@ -66,8 +66,8 @@ QByteArray strwinerror(DWORD errorcode) out.chop(2); /* Append error number to error message for good measure */ - out.append(" ("); - out.append(QByteArray::number((int)errorcode)); + out.append(" (0x"); + out.append(QByteArray::number(uint(errorcode), 16).rightJustified(8, '0')); out.append(")"); } return out; |