Skip to content
  • Error
  • class Esri::ArcGISRuntime::Error

    Error information about an ArcGIS Maps SDK or server error. More...

    Header: #include <Error.h>
    Since: Esri::ArcGISRuntime 100.0

    Public Functions

    Error()
    (since Esri::ArcGISRuntime 100.3) Error(QString message, QString additionalMessage, Esri::ArcGISRuntime::ExtendedErrorType extendedErrorType = ExtendedErrorType::None)
    Error(const Esri::ArcGISRuntime::Error &other)
    Error(Esri::ArcGISRuntime::Error &&other)
    ~Error()
    (since Esri::ArcGISRuntime 200.0) QVariantMap additionalInformation() const
    QString additionalMessage() const
    (since Esri::ArcGISRuntime 300.0) std::optional<Esri::ArcGISRuntime::ErrorType> arcGISRuntimeErrorType() const
    (since Esri::ArcGISRuntime 300.0) std::optional<int> arcGISServerErrorCode() const
    Esri::ArcGISRuntime::ErrorDomainType domain() const
    (since Esri::ArcGISRuntime 100.11) Esri::ArcGISRuntime::ErrorType errorType() const
    Esri::ArcGISRuntime::ExtendedErrorType extendedErrorType() const
    bool isEmpty() const
    QString message() const
    (since Esri::ArcGISRuntime 200.2) Esri::ArcGISRuntime::Error underlyingError() const
    Esri::ArcGISRuntime::Error &operator=(Esri::ArcGISRuntime::Error &&other)
    Esri::ArcGISRuntime::Error &operator=(const Esri::ArcGISRuntime::Error &other)

    Detailed Description

    A user-defined error can also be created using custom message strings.

    Member Function Documentation

    Error::Error()

    Constructor.

    [since Esri::ArcGISRuntime 100.3] Error::Error(QString message, QString additionalMessage, Esri::ArcGISRuntime::ExtendedErrorType extendedErrorType = ExtendedErrorType::None)

    Constructor accepting user defined messages.

    • message. The error message.
    • additionalMessage. The additional, detailed error message.
    • extendedErrorType. The extended error type, if not set this is, ExtendedErrorType::None.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    Error::Error(const Esri::ArcGISRuntime::Error &other)

    Copy constructor from other Error.

    [noexcept] Error::Error(Esri::ArcGISRuntime::Error &&other)

    Move constructor from other Error.

    [noexcept] Error::~Error()

    Destructor.

    [since Esri::ArcGISRuntime 200.0] QVariantMap Error::additionalInformation() const

    Additional information about the error.

    This function was introduced in Esri::ArcGISRuntime 200.0.

    QString Error::additionalMessage() const

    Gets the detailed error message.

    [since Esri::ArcGISRuntime 300.0] std::optional<Esri::ArcGISRuntime::ErrorType> Error::arcGISRuntimeErrorType() const

    Gets the type of the error if the domain is ErrorDomainType::ArcGISRuntime.

    Returns std::nullopt if the domain of the error is not ErrorDomainType::ArcGISRuntime.

    This function was introduced in Esri::ArcGISRuntime 300.0.

    [since Esri::ArcGISRuntime 300.0] std::optional<int> Error::arcGISServerErrorCode() const

    Gets the code from an ArcGIS server error, if there was one.

    Returns std::nullopt if the domain of the error is not ErrorDomainType::ArcGISServer.

    This function was introduced in Esri::ArcGISRuntime 300.0.

    Esri::ArcGISRuntime::ErrorDomainType Error::domain() const

    Gets the error domain.

    [since Esri::ArcGISRuntime 100.11] Esri::ArcGISRuntime::ErrorType Error::errorType() const

    Gets the type of the error regardless of domain.

    Warning: This value is only meaningful if the domain is ErrorDomainType::ArcGISRuntime. It is recommended to call arcGISRuntimeErrorType or arcGISServerErrorCode instead to avoid potental misinterpretation of this value.

    This function was introduced in Esri::ArcGISRuntime 100.11.

    Esri::ArcGISRuntime::ExtendedErrorType Error::extendedErrorType() const

    Gets the extended error type.

    bool Error::isEmpty() const

    Gets whether the object is empty.

    Returns true if empty.

    QString Error::message() const

    Gets the error message.

    [since Esri::ArcGISRuntime 200.2] Esri::ArcGISRuntime::Error Error::underlyingError() const

    Gets the error's underlying error.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [noexcept] Esri::ArcGISRuntime::Error &Error::operator=(Esri::ArcGISRuntime::Error &&other)

    Move operator from other Error.

    Esri::ArcGISRuntime::Error &Error::operator=(const Esri::ArcGISRuntime::Error &other)

    Assignment operator from other Error.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.