From 09dfd027d5fc3ed0f9f262abab1fdb99508adc7e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 11 Aug 2010 18:06:56 -0400 Subject: [PATCH] More detailed misnamed column error in ColumnAccessCommand._get_column --- hooke/plugin/curve.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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] -- 2.26.2