NeoFOAM
WIP Prototype of a modern OpenFOAM core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Concepts
Classes | Namespaces | Macros
exceptions.hpp File Reference

Go to the source code of this file.

Classes

class  NeoFOAM::Error
 Base class for consistent error representation. More...
 
class  NeoFOAM::DimensionMismatch
 Error for handling two containers of incompatible lengths. More...
 

Namespaces

namespace  NeoFOAM
 

Macros

#define NeoFOAM_ASSERT_EQUAL_LENGTH(_op1, _op2)
 

Macro Definition Documentation

◆ NeoFOAM_ASSERT_EQUAL_LENGTH

#define NeoFOAM_ASSERT_EQUAL_LENGTH (   _op1,
  _op2 
)
Value:
if (_op1.size() != _op2.size()) \
{ \
throw ::NeoFOAM::DimensionMismatch( \
__FILE__, __LINE__, __func__, _op1.size(), _op2.size(), "expected equal dimensions" \
); \
}

Asserts that _op1 and _op2 have the same length.

Exceptions
DimensionMismatchif _op1 and _op2 differ in the number of rows or columns

Definition at line 96 of file exceptions.hpp.