Belle II Software development
ConstructorNotFoundError Class Reference
Inheritance diagram for ConstructorNotFoundError:

Public Member Functions

 __init__ (self, members, list_constructors, obj_name)
 

Public Attributes

str message = "No corresponding constructor found. Looking for signature: \n"
 Member contatining the final message of the exception.
 
 members = members
 Dictionary.
 
 list_constructors = list_constructors
 List of constructors.
 
 name = obj_name
 Name of the class.
 

Detailed Description

Class that throws an exception when a specific constructor is not found.
The error message will contain the signature of the wanted constructor,
as well as the signature of the available constructors.

Definition at line 126 of file _constwrapper.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
members,
list_constructors,
obj_name )
Parameters:
-----------
members: dictionary
    Contains the name of the parameters of the wanted constructor and their types

list_constructors: list of dictionaries
    Contains all the available constructors, with the names of their parameters
    and their types

obj_name: string
    Name of the class of which the constructor is wanted

Definition at line 132 of file _constwrapper.py.

132 def __init__(self, members, list_constructors, obj_name):
133 '''
134 Parameters:
135 -----------
136 members: dictionary
137 Contains the name of the parameters of the wanted constructor and their types
138
139 list_constructors: list of dictionaries
140 Contains all the available constructors, with the names of their parameters
141 and their types
142
143 obj_name: string
144 Name of the class of which the constructor is wanted
145 '''
146
147 self.message = "No corresponding constructor found. Looking for signature: \n"
148
149 self.members = members
150
151 self.list_constructors = list_constructors
152
153 self.name = obj_name
154 self.message = self.message + self.name + "("
155 self.message = (self.message +
156 ", ".join([" ".join(i) for i in list(zip(self.members.values(), self.members.keys()))]) +
157 ")\n Available constructors:\n")
158 for lis in self.list_constructors:
159 self.message = (self.message +
160 self.name + "(" + ", ".join([" ".join(i) for i in list(zip(lis.values(), lis.keys()))]) + ")\n")
161 super().__init__(self.message)
162
163

Member Data Documentation

◆ list_constructors

list_constructors = list_constructors

List of constructors.

Definition at line 151 of file _constwrapper.py.

◆ members

members = members

Dictionary.

Definition at line 149 of file _constwrapper.py.

◆ message

message = "No corresponding constructor found. Looking for signature: \n"

Member contatining the final message of the exception.

Definition at line 147 of file _constwrapper.py.

◆ name

name = obj_name

Name of the class.

Definition at line 153 of file _constwrapper.py.


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