From ceeea2ed21ef7c7370740c66373a8786f2787400 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 8 Jul 2013 01:35:18 +0000 Subject: [PATCH] [ck2cti] Improve messages for some input file errors --- interfaces/python/ck2cti.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interfaces/python/ck2cti.py b/interfaces/python/ck2cti.py index a0462dbc0..5d80c6d0c 100755 --- a/interfaces/python/ck2cti.py +++ b/interfaces/python/ck2cti.py @@ -926,8 +926,8 @@ class Parser(object): for i,j,k in [(2,30,45), (2,45,60), (2,60,75), (3,0,15), (3,15,30), (3,30,45), (3,45,60)]] - except (IndexError, ValueError): - raise InputParseError('Error while reading thermo entry for species {0}'.format(species)) + except (IndexError, ValueError) as err: + raise InputParseError('Error while reading thermo entry for species {0}:\n{1}'.format(species, err)) composition = self.parseComposition(lines[0][24:44], 4, 5) @@ -987,8 +987,8 @@ class Parser(object): polys.append(NASA(Tmin=(Tmin,"K"), Tmax=(Tmax,"K"), coeffs=coeffs)) totalTmin = min(Tmin, totalTmin) totalTmax = max(Tmax, totalTmax) - except (IndexError, ValueError): - raise InputParseError('Error while reading thermo entry for species {0}'.format(species)) + except (IndexError, ValueError) as err: + raise InputParseError('Error while reading thermo entry for species {0}:\n{1}'.format(species, err)) thermo = MultiNASA(polynomials=polys, Tmin=(totalTmin,"K"),