RINGMesh  Version 5.0.0
A programming library for geological model meshes
RINGMesh::RINGMeshException Class Reference

#include <common.h>

Inheritance diagram for RINGMesh::RINGMeshException:

Public Member Functions

template<typename... Args>
 RINGMeshException (std::string category, const Args &... messages)
 
virtual ~RINGMeshException () throw ()
 
const std::string & category () const
 

Protected Attributes

std::string category_ {}
 

Private Member Functions

template<typename A0 >
std::string string_concatener (const A0 &a0)
 
template<typename A0 , typename A1 , typename... Args>
std::string string_concatener (const A0 &a0, const A1 &a1, const Args &... args)
 

Detailed Description

RINGMesh exception class. Example: throw RINGMeshException( "I/O", "Error while loading the GeoModel" ) ;

  try {
     ...
  } catch( const RINGMeshException& e ) {
     Logger::err( e.category(), e.what() ) ;
  } catch( const std::exception& e ) {
     // Catch all others STL exceptions
     Logger::err( "Exception", e.what() );
  }

Definition at line 151 of file common.h.

Constructor & Destructor Documentation

◆ RINGMeshException()

template<typename... Args>
RINGMesh::RINGMeshException::RINGMeshException ( std::string  category,
const Args &...  messages 
)
inlineexplicit

Definition at line 155 of file common.h.

◆ ~RINGMeshException()

virtual RINGMesh::RINGMeshException::~RINGMeshException ( )
throw (
)
inlinevirtual

Definition at line 161 of file common.h.

Member Function Documentation

◆ category()

const std::string& RINGMesh::RINGMeshException::category ( ) const
inline

Definition at line 165 of file common.h.

◆ string_concatener() [1/2]

template<typename A0 >
std::string RINGMesh::RINGMeshException::string_concatener ( const A0 &  a0)
inlineprivate

Definition at line 172 of file common.h.

◆ string_concatener() [2/2]

template<typename A0 , typename A1 , typename... Args>
std::string RINGMesh::RINGMeshException::string_concatener ( const A0 &  a0,
const A1 &  a1,
const Args &...  args 
)
inlineprivate

Definition at line 178 of file common.h.

Member Data Documentation

◆ category_

std::string RINGMesh::RINGMeshException::category_ {}
protected

Definition at line 186 of file common.h.


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