From d5adf51cfe2ac7e00bbbc3000369a788529d537f Mon Sep 17 00:00:00 2001 From: Joakim Uddholm Date: Thu, 15 Feb 2018 00:49:59 +0100 Subject: [PATCH] More helpful error message for RecordCollection.one --- records.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/records.py b/records.py index 3735773..c5598af 100644 --- a/records.py +++ b/records.py @@ -243,7 +243,9 @@ class RecordCollection(object): except IndexError: pass else: - raise ValueError('RecordCollection contains too many rows.') + raise ValueError('RecordCollection contained more than one row. ' + 'Expects only one row when using ' + 'RecordCollection.one') # Cast and return. if as_dict: