MGIS
Loading...
Searching...
No Matches
mgis::ContractViolationHandler Struct Referencefinal

a class used to report a contract violation More...

#include </home/runner/work/MFrontGenericInterfaceSupport/MFrontGenericInterfaceSupport/include/MGIS/Contract.hxx>

Inheritance diagram for mgis::ContractViolationHandler:
mgis::AbstractErrorHandler

Public Member Functions

constexpr ContractViolationHandler ()=default
 destructor
 
InvalidResult registerErrorMessage (const char *const) override
 register a new error message
 
constexpr ~ContractViolationHandler () override
 destructor
 
- Public Member Functions inherited from mgis::AbstractErrorHandler
virtual constexpr ~AbstractErrorHandler ()=default
 destructor
 

Static Protected Member Functions

static void abort (const char *const) noexcept
 

Detailed Description

a class used to report a contract violation

The behaviour of this class is determined by the contract_violation_policy variable.

This class can be used in a constexpr context, if no contrat violation is detected. If a contract violation is detected, a compile-time error is generated since registerErrorMessage is not constexpr.

Member Function Documentation

◆ registerErrorMessage()

InvalidResult mgis::ContractViolationHandler::registerErrorMessage ( const char * const  )
overridevirtual

register a new error message

Parameters
[in]eerror message

Implements mgis::AbstractErrorHandler.


The documentation for this struct was generated from the following files: