Skip to content

Commit

Permalink
make the error message when attempting to describe a column of unknow…
Browse files Browse the repository at this point in the history
…n type more substantial
  • Loading branch information
hobu committed Oct 2, 2012
1 parent aa8a467 commit aa0af8a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/backends/postgresql/statement.cpp
Expand Up @@ -528,7 +528,12 @@ void postgresql_statement_backend::describe_column(int colNum, data_type & type,
break;

default:
throw soci_error("Unknown data type.");
{
std::stringstream message;
message << "unknown data type with typelem: " << typeOid << " for colNum: " << colNum << " with name: " << PQfname(result_, pos);
throw soci_error(message.str());

}
}

columnName = PQfname(result_, pos);
Expand Down

0 comments on commit aa0af8a

Please sign in to comment.