QDBusError Class ReferenceThe QDBusError class represents an error received from the D-Bus bus or from remote applications found in the bus. More... #include <QDBusError> This class was introduced in Qt 4.2. Public Types
Public Functions
Static Public Members
Detailed DescriptionThe QDBusError class represents an error received from the D-Bus bus or from remote applications found in the bus. When dealing with the D-Bus bus service or with remote applications over D-Bus, a number of error conditions can happen. This error conditions are sometimes signalled by a returned error value or by a QDBusError. C++ and Java exceptions are a valid analogy for D-Bus errors: instead of returning normally with a return value, remote applications and the bus may decide to throw an error condition. However, the QtDBus implementation does not use the C++ exception-throwing mechanism, so you will receive QDBusErrors in the return reply (see QDBusReply::error()). QDBusError objects are used to inspect the error name and message as received from the bus and remote applications. You should not create such objects yourself to signal error conditions when called from D-Bus: instead, use QDBusMessage::createError() and QDBusConnection::send(). See also QDBusConnection::send(), QDBusMessage, and QDBusReply. Member Type Documentationenum QDBusError::ErrorTypeIn order to facilitate verification of the most common D-Bus errors generated by the D-Bus implementation and by the bus daemon itself, QDBusError can be compared to a set of pre-defined values:
Member Function DocumentationQString QDBusError::errorString ( ErrorType error ) [static]Returns the error name associated with error condition error. This function was introduced in Qt 4.3. bool QDBusError::isValid () constReturns true if this is a valid error condition (i.e., if there was an error), otherwise false. QString QDBusError::message () constReturns the message that the callee associated with this error. Error messages are implementation defined and usually contain a human-readable error code, though this does not mean it is suitable for your end-users. QString QDBusError::name () constReturns this error's name. Error names are similar to D-Bus Interface names, like org.freedesktop.DBus.InvalidArgs. See also type(). ErrorType QDBusError::type () constReturns this error's ErrorType. See also ErrorType. X
|
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |