mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-26 00:20:34 +01:00
style fixes
This commit is contained in:
parent
9710a828a3
commit
d11b69ca00
@ -1313,13 +1313,13 @@ 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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else return SQL_NULL_DATA == _pPreparator->actualDataSize(col, row);
|
||||||
return SQL_NULL_DATA == _pPreparator->actualDataSize(col, row);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,7 +105,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&)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
const std::size_t maxFieldSize = AnyCast<std::size_t>(session().getProperty("maxFieldSize"));
|
const std::size_t maxFieldSize = AnyCast<std::size_t>(session().getProperty("maxFieldSize"));
|
||||||
const ODBCMetaColumn::NumericConversion numericConversion = dynamic_cast<SessionImpl&>(session()).numericConversion();
|
const ODBCMetaColumn::NumericConversion numericConversion = dynamic_cast<SessionImpl&>(session()).numericConversion();
|
||||||
@ -126,7 +129,8 @@ void ODBCStatementImpl::makeInternalExtractors()
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
fillColumns(currentDataSet());
|
fillColumns(currentDataSet());
|
||||||
} catch (DataFormatException&)
|
}
|
||||||
|
catch (DataFormatException&)
|
||||||
{
|
{
|
||||||
if (isStoredProcedure()) return;
|
if (isStoredProcedure()) return;
|
||||||
throw;
|
throw;
|
||||||
|
@ -402,7 +402,10 @@ void SessionImpl::close()
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
commit();
|
commit();
|
||||||
}catch (ConnectionException&) { }
|
}
|
||||||
|
catch (ConnectionException&)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
SQLDisconnect(_db);
|
SQLDisconnect(_db);
|
||||||
}
|
}
|
||||||
|
@ -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());
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,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.");
|
||||||
}
|
}
|
||||||
|
@ -557,7 +557,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());
|
||||||
}
|
}
|
||||||
|
@ -111,8 +111,8 @@ std::size_t Statement::execute(bool doReset)
|
|||||||
doAsyncExec();
|
doAsyncExec();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
throw InvalidAccessException("Statement still executing.");
|
else throw InvalidAccessException("Statement still executing.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -133,7 +133,8 @@ int WebSocketImpl::receiveHeader(char mask[4], bool& useMask)
|
|||||||
Poco::UInt64 l;
|
Poco::UInt64 l;
|
||||||
reader >> l;
|
reader >> l;
|
||||||
payloadLength = static_cast<int>(l);
|
payloadLength = static_cast<int>(l);
|
||||||
} else if (lengthByte == 126)
|
}
|
||||||
|
else if (lengthByte == 126)
|
||||||
{
|
{
|
||||||
n = receiveNBytes(header + 2, 2);
|
n = receiveNBytes(header + 2, 2);
|
||||||
if (n <= 0)
|
if (n <= 0)
|
||||||
|
@ -88,11 +88,13 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (const ios_base::failure&)
|
}
|
||||||
|
catch (const ios_base::failure&)
|
||||||
{
|
{
|
||||||
cerr << "io failure" << endl;
|
cerr << "io failure" << endl;
|
||||||
return 1;
|
return 1;
|
||||||
} catch (const Poco::Exception& e)
|
}
|
||||||
|
catch (const Poco::Exception& e)
|
||||||
{
|
{
|
||||||
cerr << e.displayText() << endl;
|
cerr << e.displayText() << endl;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -125,7 +125,9 @@ void ZipFileInfo::parse(std::istream& inp, bool assumeHeaderRead)
|
|||||||
if(size >= 8 && getOffsetFromHeader() == ZipCommon::ZIP64_MAGIC) {
|
if(size >= 8 && getOffsetFromHeader() == ZipCommon::ZIP64_MAGIC) {
|
||||||
setOffset(ZipUtil::get64BitValue(ptr, 0)); size -= 8; ptr += 8;
|
setOffset(ZipUtil::get64BitValue(ptr, 0)); size -= 8; ptr += 8;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
ptr += size;
|
ptr += size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user