Skip to content
Permalink
Browse files
Change an assert to an error message to avoid any future crashes like
that in ticket #136


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5572 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Jul 9, 2006
1 parent fd1eb1f commit b26ce4719844c3e585a5b20c00b91fabfb604dcd
Showing with 9 additions and 2 deletions.
  1. +9 −2 src/providers/postgres/qgspostgresprovider.cpp
@@ -1360,7 +1360,14 @@ void QgsPostgresProvider::findColumns(tableCols& cols)
ii = columnRelations.find(QString(ii->second.table_schema + '.' +
ii->second.table_name + '.' +
ii->second.column_name));
assert(ii != columnRelations.end());
if (ii == columnRelations.end())
{
std::cerr << "ERROR: Failed to find the column that "
<< ii->second.table_schema.local8Bit().data() << '.'
<< ii->second.table_name.local8Bit().data() << "."
<< ii->second.column_name.local8Bit().data()
<< " refers to.\n";
}
++count;
}

@@ -1373,7 +1380,7 @@ void QgsPostgresProvider::findColumns(tableCols& cols)
<< "interation limit (" << max_loops << ").\n";
cols[ii->second.view_column_name] = SRC("","","","");
}
else
else if (ii != columnRelations.end())
{
cols[ii->second.view_column_name] =
SRC(ii->second.table_schema,

0 comments on commit b26ce47

Please sign in to comment.