Nektar++
Public Member Functions | List of all members
CellMLToNektar.pycml.UnitsError Class Reference
Inheritance diagram for CellMLToNektar.pycml.UnitsError:
[legend]

Public Member Functions

def __init__ (self, context_obj, message, warn=False, level=None)
 
def __unicode__ (self)
 
- Public Member Functions inherited from CellMLToNektar.pycml.MathsError
def __init__ (self, context_obj, message, warn=False, level=None)
 
def show_xml_context_only (self)
 
def __str__ (self)
 
def ordinal (self, i)
 
def __unicode__ (self)
 

Additional Inherited Members

- Public Attributes inherited from CellMLToNektar.pycml.MathsError
 message
 
 warn
 
 level
 
 show_xml_context
 
 cname
 
 ename
 
 context
 
 expr_index
 
 math_index
 
 reaction_spec
 

Detailed Description

Exception class for validation errors raised during units checking
of mathematics.

Definition at line 3429 of file pycml.py.

Constructor & Destructor Documentation

◆ __init__()

def CellMLToNektar.pycml.UnitsError.__init__ (   self,
  context_obj,
  message,
  warn = False,
  level = None 
)
Create a units validation error.

context_class should be the object that is reporting the error.
message gives more details on what went wrong.
If warn is set to true then produce a warning message, not an error.
level gives the level of the message logged.

Reimplemented from CellMLToNektar.pycml.MathsError.

Definition at line 3434 of file pycml.py.

3434 def __init__(self, context_obj, message, warn=False, level=None):
3435 """Create a units validation error.
3436
3437 context_class should be the object that is reporting the error.
3438 message gives more details on what went wrong.
3439 If warn is set to true then produce a warning message, not an error.
3440 level gives the level of the message logged.
3441 """
3442 MathsError.__init__(self, context_obj, message, warn=warn, level=level)
3443 return
3444

Member Function Documentation

◆ __unicode__()

def CellMLToNektar.pycml.UnitsError.__unicode__ (   self)

Reimplemented from CellMLToNektar.pycml.MathsError.

Definition at line 3445 of file pycml.py.

3445 def __unicode__(self):
3446 return self._generate_message('checking units')
3447
3448

References CellMLToNektar.pycml.MathsError._generate_message().