diff --git a/Data/ODBC/src/Extractor.cpp b/Data/ODBC/src/Extractor.cpp index b802fc6d0..749280f39 100644 --- a/Data/ODBC/src/Extractor.cpp +++ b/Data/ODBC/src/Extractor.cpp @@ -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); } diff --git a/Data/ODBC/src/ODBCStatementImpl.cpp b/Data/ODBC/src/ODBCStatementImpl.cpp index 673578372..5a37892ab 100644 --- a/Data/ODBC/src/ODBCStatementImpl.cpp +++ b/Data/ODBC/src/ODBCStatementImpl.cpp @@ -105,7 +105,10 @@ void ODBCStatementImpl::compileImpl() { Poco::Any dti = session().getProperty("dataTypeInfo"); pDT = AnyCast(dti); - }catch (NotSupportedException&) { } + } + catch (NotSupportedException&) + { + } const std::size_t maxFieldSize = AnyCast(session().getProperty("maxFieldSize")); const ODBCMetaColumn::NumericConversion numericConversion = dynamic_cast(session()).numericConversion(); @@ -126,7 +129,8 @@ void ODBCStatementImpl::makeInternalExtractors() try { fillColumns(currentDataSet()); - } catch (DataFormatException&) + } + catch (DataFormatException&) { if (isStoredProcedure()) return; throw; diff --git a/Data/ODBC/src/SessionImpl.cpp b/Data/ODBC/src/SessionImpl.cpp index cc4bc9580..4a1079de2 100644 --- a/Data/ODBC/src/SessionImpl.cpp +++ b/Data/ODBC/src/SessionImpl.cpp @@ -402,7 +402,10 @@ void SessionImpl::close() try { commit(); - }catch (ConnectionException&) { } + } + catch (ConnectionException&) + { + } SQLDisconnect(_db); } diff --git a/Data/include/Poco/Data/BulkExtraction.h b/Data/include/Poco/Data/BulkExtraction.h index 2a76110ef..ea1b2ba5f 100644 --- a/Data/include/Poco/Data/BulkExtraction.h +++ b/Data/include/Poco/Data/BulkExtraction.h @@ -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()); } diff --git a/Data/include/Poco/Data/Row.h b/Data/include/Poco/Data/Row.h index 8bab3c3d5..744072a91 100644 --- a/Data/include/Poco/Data/Row.h +++ b/Data/include/Poco/Data/Row.h @@ -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."); } diff --git a/Data/include/Poco/Data/StatementImpl.h b/Data/include/Poco/Data/StatementImpl.h index 0c8b8e117..a4f4df051 100644 --- a/Data/include/Poco/Data/StatementImpl.h +++ b/Data/include/Poco/Data/StatementImpl.h @@ -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()); } diff --git a/Data/src/Statement.cpp b/Data/src/Statement.cpp index 0e4fd2074..faec14f51 100644 --- a/Data/src/Statement.cpp +++ b/Data/src/Statement.cpp @@ -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."); } diff --git a/Net/src/WebSocketImpl.cpp b/Net/src/WebSocketImpl.cpp index 4d20cb44c..33e4dd56c 100644 --- a/Net/src/WebSocketImpl.cpp +++ b/Net/src/WebSocketImpl.cpp @@ -133,7 +133,8 @@ int WebSocketImpl::receiveHeader(char mask[4], bool& useMask) Poco::UInt64 l; reader >> l; payloadLength = static_cast(l); - } else if (lengthByte == 126) + } + else if (lengthByte == 126) { n = receiveNBytes(header + 2, 2); if (n <= 0) diff --git a/XML/samples/RoundTrip/src/RoundTrip.cpp b/XML/samples/RoundTrip/src/RoundTrip.cpp index 3b136c908..f0d6af9c7 100644 --- a/XML/samples/RoundTrip/src/RoundTrip.cpp +++ b/XML/samples/RoundTrip/src/RoundTrip.cpp @@ -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; diff --git a/Zip/src/ZipFileInfo.cpp b/Zip/src/ZipFileInfo.cpp index b2b88e673..c426e247a 100644 --- a/Zip/src/ZipFileInfo.cpp +++ b/Zip/src/ZipFileInfo.cpp @@ -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; } }