style fixes

This commit is contained in:
Guenter Obiltschnig 2016-04-16 09:57:54 +02:00
parent 9710a828a3
commit d11b69ca00
10 changed files with 30 additions and 15 deletions

View File

@ -1313,13 +1313,13 @@ bool Extractor::isNull(std::size_t col, std::size_t row)
try
{
return isNullLengthIndicator(_lengths.at(col));
} catch (std::out_of_range& ex)
}
catch (std::out_of_range& ex)
{
throw RangeException(ex.what());
}
}
else
return SQL_NULL_DATA == _pPreparator->actualDataSize(col, row);
else return SQL_NULL_DATA == _pPreparator->actualDataSize(col, row);
}

View File

@ -105,7 +105,10 @@ void ODBCStatementImpl::compileImpl()
{
Poco::Any dti = session().getProperty("dataTypeInfo");
pDT = AnyCast<TypeInfo*>(dti);
}catch (NotSupportedException&) { }
}
catch (NotSupportedException&)
{
}
const std::size_t maxFieldSize = AnyCast<std::size_t>(session().getProperty("maxFieldSize"));
const ODBCMetaColumn::NumericConversion numericConversion = dynamic_cast<SessionImpl&>(session()).numericConversion();
@ -126,7 +129,8 @@ void ODBCStatementImpl::makeInternalExtractors()
try
{
fillColumns(currentDataSet());
} catch (DataFormatException&)
}
catch (DataFormatException&)
{
if (isStoredProcedure()) return;
throw;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -133,7 +133,8 @@ int WebSocketImpl::receiveHeader(char mask[4], bool& useMask)
Poco::UInt64 l;
reader >> l;
payloadLength = static_cast<int>(l);
} else if (lengthByte == 126)
}
else if (lengthByte == 126)
{
n = receiveNBytes(header + 2, 2);
if (n <= 0)

View File

@ -88,11 +88,13 @@ int main(int argc, char* argv[])
}
}
}
} catch (const ios_base::failure&)
}
catch (const ios_base::failure&)
{
cerr << "io failure" << endl;
return 1;
} catch (const Poco::Exception& e)
}
catch (const Poco::Exception& e)
{
cerr << e.displayText() << endl;
return 1;

View File

@ -125,7 +125,9 @@ void ZipFileInfo::parse(std::istream& inp, bool assumeHeaderRead)
if(size >= 8 && getOffsetFromHeader() == ZipCommon::ZIP64_MAGIC) {
setOffset(ZipUtil::get64BitValue(ptr, 0)); size -= 8; ptr += 8;
}
} else {
}
else
{
ptr += size;
}
}