From: W. Trevor King Date: Wed, 11 Aug 2010 22:06:56 +0000 (-0400) Subject: More detailed misnamed column error in ColumnAccessCommand._get_column X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=09dfd027d5fc3ed0f9f262abab1fdb99508adc7e;p=hooke.git More detailed misnamed column error in ColumnAccessCommand._get_column --- diff --git a/hooke/plugin/curve.py b/hooke/plugin/curve.py index 308124b..e5a12ae 100644 --- a/hooke/plugin/curve.py +++ b/hooke/plugin/curve.py @@ -161,7 +161,12 @@ class ColumnAccessCommand (BlockCommand): column_name = self._column_arguments[0].name column_name = params[column_name] block = self._block(hooke, params, block_name) - column_index = block.info['columns'].index(column_name) + columns = block.info['columns'] + try: + column_index = columns.index(column_name) + except ValueError, e: + raise Failure('%s not in %s (%s): %s' + % (column_name, block.info['name'], columns, e)) return block[:,column_index]