Senzing C++ SDK
C++ SDK for Senzing v4, patterned after the official C# SDK
Loading...
Searching...
No Matches
senzing::sdk::SzException Class Reference

Base exception for all Senzing engine errors. More...

#include <SzException.hpp>

Inheritance diagram for senzing::sdk::SzException:
Collaboration diagram for senzing::sdk::SzException:

Public Member Functions

 SzException ()=default
 SzException (std::string message)
 SzException (std::optional< int64_t > errorCode, std::string message)
 SzException (const std::exception &cause)
 SzException (std::string message, const std::exception &cause)
 SzException (std::optional< int64_t > errorCode, std::string message, const std::exception &cause)
 ~SzException () override=default
std::optional< int64_t > ErrorCode () const noexcept
 The underlying Senzing error code, or std::nullopt if none was associated with this exception.
const char * what () const noexcept override

Protected Attributes

std::string message_
std::optional< int64_t > errorCode_

Detailed Description

Base exception for all Senzing engine errors.

Mirrors the six C# constructors. The optional cause is captured as a human-readable string appended to the message (C++ std::exception has no built-in cause chaining like .NET's InnerException).

Constructor & Destructor Documentation

◆ SzException() [1/6]

senzing::sdk::SzException::SzException ( )
default

◆ SzException() [2/6]

senzing::sdk::SzException::SzException ( std::string message)
inlineexplicit

◆ SzException() [3/6]

senzing::sdk::SzException::SzException ( std::optional< int64_t > errorCode,
std::string message )
inline

◆ SzException() [4/6]

senzing::sdk::SzException::SzException ( const std::exception & cause)
inlineexplicit

◆ SzException() [5/6]

senzing::sdk::SzException::SzException ( std::string message,
const std::exception & cause )
inline

◆ SzException() [6/6]

senzing::sdk::SzException::SzException ( std::optional< int64_t > errorCode,
std::string message,
const std::exception & cause )
inline

◆ ~SzException()

senzing::sdk::SzException::~SzException ( )
overridedefault

Member Function Documentation

◆ ErrorCode()

std::optional< int64_t > senzing::sdk::SzException::ErrorCode ( ) const
inlinenodiscardnoexcept

The underlying Senzing error code, or std::nullopt if none was associated with this exception.

◆ what()

const char * senzing::sdk::SzException::what ( ) const
inlinenodiscardoverridenoexcept

Member Data Documentation

◆ errorCode_

std::optional<int64_t> senzing::sdk::SzException::errorCode_
protected

◆ message_

std::string senzing::sdk::SzException::message_
protected

The documentation for this class was generated from the following file: