From 1b8e49d13b10d80828925cafcc0dec57c8c89c9f Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 16 Dec 2011 07:48:02 -0800 Subject: [PATCH] sqlite: improve the error message when geometry_field could not be autodetected --- plugins/input/sqlite/sqlite_datasource.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/input/sqlite/sqlite_datasource.cpp b/plugins/input/sqlite/sqlite_datasource.cpp index 477208aca..2ae5e3b67 100644 --- a/plugins/input/sqlite/sqlite_datasource.cpp +++ b/plugins/input/sqlite/sqlite_datasource.cpp @@ -224,7 +224,12 @@ void sqlite_datasource::bind() const if (geometry_field_.empty()) { - throw datasource_exception("Sqlite Plugin: cannot detect geometry_field, please supply the name of the geometry_field to use."); + std::ostringstream s; + s << "Sqlite Plugin: unable to detect the column " + << "containing a valid geometry on table '" << geometry_table_ << "'. " + << "Please provide a column name by passing the 'geometry_field' option " + << "or indicate a different spatial table to use by passing the 'geometry_table' option"; + throw datasource_exception(s.str()); } if (index_table_.empty())