@@ -34,12 +34,12 @@ def typeProcessor(assumed_type):
3434 elif 'flt' in assumed_type :
3535 return 'floating_point'
3636 else :
37- raise Exception ('ENGINE-ERROR: A fatal function was passed a incomprehensible argument' )
37+ raise Exception ('ENGINE-[ ERROR] A fatal function was passed a incomprehensible argument' )
3838
3939 def findClass (library , var , type , value ):
4040 # Searches for variables class and returns it
4141 if not os .path .exists (library ):
42- raise FileNotFoundError (f'ERROR: Package pdlparse cannot find file { library } .' )
42+ raise FileNotFoundError (f'[ ERROR] Package pdlparse cannot find file { library } .' )
4343
4444 with open (library , 'r+' ) as file :
4545 file_content = file .read ()
@@ -64,7 +64,7 @@ def findClass(library, var, type, value):
6464def scrap_library (library ):
6565 # Get all variables in library
6666 if not os .path .exists (library ):
67- raise FileNotFoundError (f'ERROR: Package pdlparse cannot find file { library } .' )
67+ raise FileNotFoundError (f'[ ERROR] Package pdlparse cannot find file { library } .' )
6868
6969 with open (library , 'r+' ) as file :
7070 retlist = []
@@ -90,7 +90,7 @@ def scrap_library(library):
9090def get_variable (library , variable ):
9191 # Get a variables value based on its name
9292 if not os .path .exists (library ):
93- raise FileNotFoundError (f'ERROR: Package pdlparse cannot find file { library } .' )
93+ raise FileNotFoundError (f'[ ERROR] Package pdlparse cannot find file { library } .' )
9494
9595 with open (library , 'r' ) as Fin :
9696 content = Fin .read ()
@@ -105,27 +105,27 @@ def get_variable(library, variable):
105105 type = utility .typeProcessor (line [0 :5 ])
106106 return str (f'{ value } , { type } ' )
107107 else :
108- raise Exception (f'ERROR: Package pdlparse cannot find { variable } in { library } .' )
108+ raise Exception (f'[ ERROR] Package pdlparse cannot find { variable } in { library } .' )
109109
110110
111111def filter_file (library , word ):
112112 # Remove given word from library
113113 if not os .path .exists (library ):
114- raise FileNotFoundError (f'ERROR: Package pdlparse cannot find file { library } .' )
114+ raise FileNotFoundError (f'[ ERROR] Package pdlparse cannot find file { library } .' )
115115 with open (library , "r+" ) as Fin :
116116 content = Fin .read ()
117117 if word in content :
118118 with open (library , "w+" ) as Fout :
119119 write_item = content .replace (word , "" )
120120 Fout .write (write_item )
121121 else :
122- raise Exception (f'ERROR: { word } cannot be found in { library } ' )
122+ raise Exception (f'[ ERROR] { word } cannot be found in { library } ' )
123123
124124
125125def get_strings (library ):
126126 # Get all strings from library
127127 if not os .path .exists (library ):
128- raise FileNotFoundError (f'ERROR: Package pdlparse cannot find file { library } .' )
128+ raise FileNotFoundError (f'[ ERROR] Package pdlparse cannot find file { library } .' )
129129
130130 with open (library , 'r+' ) as file :
131131 retlist = []
@@ -141,7 +141,7 @@ def get_strings(library):
141141def get_class (library , target_class ):
142142 # Get all variables in given class
143143 if not os .path .exists (library ):
144- raise FileNotFoundError (f'ERROR: Package pdlparse cannot find file { library } .' )
144+ raise FileNotFoundError (f'[ ERROR] Package pdlparse cannot find file { library } .' )
145145
146146 with open (library , 'r' ) as Fin :
147147 content = Fin .read ()
@@ -168,13 +168,13 @@ def get_class(library, target_class):
168168 file .close ()
169169 return retlist
170170 else :
171- raise Exception (f'ERROR: Package pdlparse cannot find { target_class } in { library } .' )
171+ raise Exception (f'[ ERROR] Package pdlparse cannot find { target_class } in { library } .' )
172172
173173
174174def get_type (library , target_type ):
175175 # Get all variables with given type
176176 if not os .path .exists (library ):
177- raise FileNotFoundError (f'ERROR: Package pdlparse cannot find file { library } .' )
177+ raise FileNotFoundError (f'[ ERROR] Package pdlparse cannot find file { library } .' )
178178
179179 with open (library , 'r' ) as Fin :
180180 content = Fin .read ()
@@ -200,13 +200,13 @@ def get_type(library, target_type):
200200 pass
201201 return retlist
202202 else :
203- raise Exception (f'ERROR: Package pdlparse cannot find { target_type } in { library } .' )
203+ raise Exception (f'[ ERROR] Package pdlparse cannot find { target_type } in { library } .' )
204204
205205
206206def get_value (library , target_value ):
207207 # Get information about a variable based on its value
208208 if not os .path .exists (library ):
209- raise FileNotFoundError (f'ERROR: Package pdlparse cannot find file { library } .' )
209+ raise FileNotFoundError (f'[ ERROR] Package pdlparse cannot find file { library } .' )
210210
211211 with open (library , 'r' ) as Fin :
212212 content = Fin .read ()
@@ -234,13 +234,13 @@ def get_value(library, target_value):
234234 pass
235235 return retlist
236236 else :
237- raise Exception (f'ERROR: Package pdlparse cannot find { target_value } in { library } .' )
237+ raise Exception (f'[ ERROR] Package pdlparse cannot find { target_value } in { library } .' )
238238
239239
240240def get_comments (library ):
241241 # Gets all comments from given library
242242 if not os .path .exists (library ):
243- raise FileNotFoundError (f'ERROR: Package pdlparse cannot find file { library } .' )
243+ raise FileNotFoundError (f'[ ERROR] Package pdlparse cannot find file { library } .' )
244244
245245 with open (library , 'r+' ) as file :
246246 retlist = []
0 commit comments