File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,27 +113,27 @@ def read(self):
113113 f'Reading { len (u_nk )} lines of u_nk from { file } ' )
114114 u_nk_list .append (u_nk )
115115 except Exception as exc :
116- msg = f'Error reading read u_nk from { file } .'
116+ msg = f'Error reading read u_nk from { file } .\n { exc } '
117117 if self .ignore_warnings :
118- self .logger .exception (msg + f' \n { exc } \n ' +
118+ self .logger .exception (msg +
119119 'This exception is being ignored because ignore_warnings=True.' )
120120 else :
121- self .logger .error (msg )
122- raise ValueError ( msg ) from exc
121+ self .logger .exception (msg )
122+ raise type ( exc )( msg )
123123
124124 try :
125125 dhdl = self ._extract_dHdl (file , T = self .T )
126126 self .logger .info (
127127 f'Reading { len (dhdl )} lines of dhdl from { file } ' )
128128 dHdl_list .append (dhdl )
129129 except Exception as exc :
130- msg = f'Error reading read dhdl from { file } .'
130+ msg = f'Error reading read dhdl from { file } .\n { exc } '
131131 if self .ignore_warnings :
132- self .logger .exception (msg + f' \n { exc } \n ' +
132+ self .logger .exception (msg +
133133 'This exception is being ignored because ignore_warnings=True.' )
134134 else :
135- self .logger .error (msg )
136- raise ValueError ( msg ) from exc
135+ self .logger .exception (msg )
136+ raise type ( exc )( msg )
137137
138138 # Sort the files according to the state
139139 self .logger .info ('Sort files according to the u_nk.' )
You can’t perform that action at this time.
0 commit comments