LibreOffice Module connectivity (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
connectivity::SQLError_Impl Class Reference

Public Member Functions

 SQLError_Impl ()
 
OUString getErrorMessage (const ErrorCondition _eCondition, const std::optional< OUString > &_rParamValue1, const std::optional< OUString > &_rParamValue2, const std::optional< OUString > &_rParamValue3) const
 
void raiseException (const ErrorCondition _eCondition, const Reference< XInterface > &_rxContext, const std::optional< OUString > &_rParamValue1, const std::optional< OUString > &_rParamValue2, const std::optional< OUString > &_rParamValue3)
 
void raiseException (const ErrorCondition _eCondition, const std::optional< OUString > &_rParamValue1, const std::optional< OUString > &_rParamValue2, const std::optional< OUString > &_rParamValue3)
 
void raiseTypedException (const ErrorCondition _eCondition, const Reference< XInterface > &_rxContext, const Type &_rExceptionType, const std::optional< OUString > &_rParamValue1, const std::optional< OUString > &_rParamValue2, const std::optional< OUString > &_rParamValue3)
 
SQLException getSQLException (const ErrorCondition _eCondition, const Reference< XInterface > &_rxContext, const std::optional< OUString > &_rParamValue1, const std::optional< OUString > &_rParamValue2, const std::optional< OUString > &_rParamValue3)
 

Static Public Member Functions

static const OUString & getMessagePrefix ()
 
static ErrorCode getErrorCode (const ErrorCondition _eCondition)
 

Private Member Functions

OUString impl_getErrorMessage (ErrorCondition _eCondition) const
 returns the basic error message associated with the given error condition, without any parameter replacements More...
 
SQLException impl_buildSQLException (const ErrorCondition _eCondition, const Reference< XInterface > &_rxContext, const std::optional< OUString > &_rParamValue1, const std::optional< OUString > &_rParamValue2, const std::optional< OUString > &_rParamValue3)
 returns an SQLException describing the given error condition More...
 

Static Private Member Functions

static OUString impl_getSQLState (ErrorCondition _eCondition)
 returns the SQLState associated with the given error condition More...
 

Private Attributes

std::locale m_aResources
 

Detailed Description

Definition at line 45 of file sqlerror.cxx.

Constructor & Destructor Documentation

◆ SQLError_Impl()

connectivity::SQLError_Impl::SQLError_Impl ( )
explicit

Definition at line 75 of file sqlerror.cxx.

References Create().

Member Function Documentation

◆ getErrorCode()

ErrorCode connectivity::SQLError_Impl::getErrorCode ( const ErrorCondition  _eCondition)
static

Definition at line 155 of file sqlerror.cxx.

Referenced by connectivity::SQLError::getErrorCode(), and impl_buildSQLException().

◆ getErrorMessage()

OUString connectivity::SQLError_Impl::getErrorMessage ( const ErrorCondition  _eCondition,
const std::optional< OUString > &  _rParamValue1,
const std::optional< OUString > &  _rParamValue2,
const std::optional< OUString > &  _rParamValue3 
) const

Definition at line 143 of file sqlerror.cxx.

References impl_getErrorMessage().

Referenced by impl_buildSQLException().

◆ getMessagePrefix()

const OUString & connectivity::SQLError_Impl::getMessagePrefix ( )
static

Definition at line 80 of file sqlerror.cxx.

Referenced by connectivity::SQLError::getMessagePrefix(), and impl_getErrorMessage().

◆ getSQLException()

SQLException connectivity::SQLError_Impl::getSQLException ( const ErrorCondition  _eCondition,
const Reference< XInterface > &  _rxContext,
const std::optional< OUString > &  _rParamValue1,
const std::optional< OUString > &  _rParamValue2,
const std::optional< OUString > &  _rParamValue3 
)

Definition at line 203 of file sqlerror.cxx.

References impl_buildSQLException().

◆ impl_buildSQLException()

SQLException connectivity::SQLError_Impl::impl_buildSQLException ( const ErrorCondition  _eCondition,
const Reference< XInterface > &  _rxContext,
const std::optional< OUString > &  _rParamValue1,
const std::optional< OUString > &  _rParamValue2,
const std::optional< OUString > &  _rParamValue3 
)
private

returns an SQLException describing the given error condition

Definition at line 209 of file sqlerror.cxx.

References Any, getErrorCode(), getErrorMessage(), and impl_getSQLState().

Referenced by getSQLException(), and raiseTypedException().

◆ impl_getErrorMessage()

OUString connectivity::SQLError_Impl::impl_getErrorMessage ( ErrorCondition  _eCondition) const
private

returns the basic error message associated with the given error condition, without any parameter replacements

Definition at line 221 of file sqlerror.cxx.

References Translate::get(), getMessagePrefix(), and m_aResources.

Referenced by getErrorMessage().

◆ impl_getSQLState()

OUString connectivity::SQLError_Impl::impl_getSQLState ( ErrorCondition  _eCondition)
staticprivate

returns the SQLState associated with the given error condition

Definition at line 228 of file sqlerror.cxx.

References connectivity::evoab::DEFAULT_STATE, and u.

Referenced by impl_buildSQLException().

◆ raiseException() [1/2]

void connectivity::SQLError_Impl::raiseException ( const ErrorCondition  _eCondition,
const Reference< XInterface > &  _rxContext,
const std::optional< OUString > &  _rParamValue1,
const std::optional< OUString > &  _rParamValue2,
const std::optional< OUString > &  _rParamValue3 
)

Definition at line 161 of file sqlerror.cxx.

References raiseTypedException().

◆ raiseException() [2/2]

void connectivity::SQLError_Impl::raiseException ( const ErrorCondition  _eCondition,
const std::optional< OUString > &  _rParamValue1,
const std::optional< OUString > &  _rParamValue2,
const std::optional< OUString > &  _rParamValue3 
)

Definition at line 174 of file sqlerror.cxx.

References raiseTypedException().

◆ raiseTypedException()

void connectivity::SQLError_Impl::raiseTypedException ( const ErrorCondition  _eCondition,
const Reference< XInterface > &  _rxContext,
const Type _rExceptionType,
const std::optional< OUString > &  _rParamValue1,
const std::optional< OUString > &  _rParamValue2,
const std::optional< OUString > &  _rParamValue3 
)

Definition at line 186 of file sqlerror.cxx.

References Any, impl_buildSQLException(), and isAssignableFrom().

Referenced by raiseException().

Member Data Documentation

◆ m_aResources

std::locale connectivity::SQLError_Impl::m_aResources
private

Definition at line 72 of file sqlerror.cxx.

Referenced by impl_getErrorMessage().


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