|
The QMError() function returns extended error message text.
char * QMError(void)
if (!QMConnect(Host, -1, UserName, Password, Account))
{
printf("Failed to connect - %s\n", QMError());
}
Note that in the C API, this function returns a pointer to a statically allocated error message buffer. The calling program must not attempt to free this memory. The standard QMError() and wide character QMErrorW() functions share a single buffer. The pointer returned by one of these functions is invalid after calling the other. There is a variant on this function, QMErrorAllocW() that returns the error message in a dynamically allocated wide character buffer that must be released with QMFree() when no longer needed.
|
QMError() as String
If Not QMConnect(Host, -1, UserName, Password, Account) Then
MsgBox(QMError(), MsgBoxStyle.Exclamation, "Failed to connect")
End If
|
Error
session = object("!qmclient")
if not(session->Connect(Host, -1, UserName, Password, Account)) then
stop "Failed to connect - " : session->Error
end
The QMError function is implemented as a public property variable in this version of the QMClient API.
|
Error
if (!qm.Connect(Host, -1, UserName, Password, Account))
{
System.out.println("Failed to connect - " + qm.Error);
}
The QMError function is implemented as a public property variable in this version of the QMClient API.
|
Error()
if not qm.Connect(Host, -1, UserName, Password, Account):
print("Failed to connect - ", QMError())
|
|