style fixes

This commit is contained in:
Guenter Obiltschnig 2016-04-16 09:49:03 +02:00
parent 7448e16b76
commit 4ee483d930
8 changed files with 28 additions and 11 deletions

View File

@ -445,7 +445,10 @@ void Binder::getColSizeAndPrecision(std::size_t pos,
colSize = (SQLINTEGER) p.columnSize(); colSize = (SQLINTEGER) p.columnSize();
decDigits = (SQLSMALLINT) p.decimalDigits(); decDigits = (SQLSMALLINT) p.decimalDigits();
return; return;
} catch (StatementException&) { } }
catch (StatementException&)
{
}
try try
{ {
@ -453,7 +456,10 @@ void Binder::getColSizeAndPrecision(std::size_t pos,
colSize = (SQLINTEGER) c.length(); colSize = (SQLINTEGER) c.length();
decDigits = (SQLSMALLINT) c.precision(); decDigits = (SQLSMALLINT) c.precision();
return; return;
} catch (StatementException&) { } }
catch (StatementException&)
{
}
// no success, set to zero and hope for the best // no success, set to zero and hope for the best
// (most drivers do not require these most of the times anyway) // (most drivers do not require these most of the times anyway)

View File

@ -1292,7 +1292,8 @@ bool Extractor::isNull(std::size_t col, std::size_t row)
try try
{ {
return isNullLengthIndicator(_lengths.at(col)); return isNullLengthIndicator(_lengths.at(col));
} catch (std::out_of_range& ex) }
catch (std::out_of_range& ex)
{ {
throw RangeException(ex.what()); throw RangeException(ex.what());
} }

View File

@ -93,7 +93,10 @@ void ODBCStatementImpl::compileImpl()
{ {
Poco::Any dti = session().getProperty("dataTypeInfo"); Poco::Any dti = session().getProperty("dataTypeInfo");
pDT = AnyCast<TypeInfo*>(dti); pDT = AnyCast<TypeInfo*>(dti);
}catch (NotSupportedException&) { } }
catch (NotSupportedException&)
{
}
std::size_t maxFieldSize = AnyCast<std::size_t>(session().getProperty("maxFieldSize")); std::size_t maxFieldSize = AnyCast<std::size_t>(session().getProperty("maxFieldSize"));
@ -113,7 +116,8 @@ void ODBCStatementImpl::makeInternalExtractors()
try try
{ {
fillColumns(); fillColumns();
} catch (DataFormatException&) }
catch (DataFormatException&)
{ {
if (isStoredProcedure()) return; if (isStoredProcedure()) return;
throw; throw;

View File

@ -386,7 +386,10 @@ void SessionImpl::close()
try try
{ {
commit(); commit();
}catch (ConnectionException&) { } }
catch (ConnectionException&)
{
}
SQLDisconnect(_db); SQLDisconnect(_db);
} }

View File

@ -88,7 +88,8 @@ public:
try try
{ {
return _nulls.at(row); return _nulls.at(row);
}catch (std::out_of_range& ex) }
catch (std::out_of_range& ex)
{ {
throw RangeException(ex.what()); throw RangeException(ex.what());
} }

View File

@ -121,7 +121,8 @@ public:
try try
{ {
_values.at(pos) = val; _values.at(pos) = val;
}catch (std::out_of_range&) }
catch (std::out_of_range&)
{ {
throw RangeException("Invalid column number."); throw RangeException("Invalid column number.");
} }

View File

@ -543,7 +543,8 @@ inline bool StatementImpl::isNull(std::size_t col, std::size_t row) const
try try
{ {
return extractions().at(col)->isNull(row); return extractions().at(col)->isNull(row);
}catch (std::out_of_range& ex) }
catch (std::out_of_range& ex)
{ {
throw RangeException(ex.what()); throw RangeException(ex.what());
} }

View File

@ -111,8 +111,8 @@ std::size_t Statement::execute(bool reset)
doAsyncExec(); doAsyncExec();
return 0; return 0;
} }
} else }
throw InvalidAccessException("Statement still executing."); else throw InvalidAccessException("Statement still executing.");
} }