BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsls::AssertTestException Class Reference

#include <bsls_asserttestexception.h>

Public Member Functions

BSLS_KEYWORD_CONSTEXPR AssertTestException (const char *expression, const char *filename, int lineNumber, const char *level="UNKNOWN")
 
const char * expression () const
 
const char * filename () const
 
const char * level () const
 
int lineNumber () const
 

Detailed Description

This class is an implementation detail of the bsls testing framework and should not be used directly in user code. It implements an immutable mechanism to communicate information about the context of an assertion that fails to a test-case handler.

See bsls_asserttestexception

Constructor & Destructor Documentation

◆ AssertTestException()

BSLS_KEYWORD_CONSTEXPR bsls::AssertTestException::AssertTestException ( const char *  expression,
const char *  filename,
int  lineNumber,
const char *  level = "UNKNOWN" 
)
inline

Create a AssertTestException object with the specified expression, filename, lineNumber, and level. The behavior is undefined unless 0 < line and all of expression, filename, and level point to valid null-terminated character strings that will remain unmodified for the lifetime of this object (e.g., string literals).

Member Function Documentation

◆ expression()

const char * bsls::AssertTestException::expression ( ) const
inline

Return a string containing the program source of the assertion that has failed.

◆ filename()

const char * bsls::AssertTestException::filename ( ) const
inline

Return a string containing the filename of the source file containing the assertion that has failed.

◆ level()

const char * bsls::AssertTestException::level ( ) const
inline

Return a string containing a representation of the level of assertion or review macro that failed.

◆ lineNumber()

int bsls::AssertTestException::lineNumber ( ) const
inline

Return the number of the line within the file filename containing the assertion that failed.


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