|
|
Choosing A Webhost: |
CVS update of odbsequoia/src (abstract_item.cpp abstract_item.hpp): msg#00030db.carob.cvs
Date: Wednesday, February 8, 2006 @ 18:21:12 Author: marc Path: /cvsroot/carob/odbsequoia/src Modified: abstract_item.cpp (1.7 -> 1.8) abstract_item.hpp (1.13 -> 1.14) Simplified _PROTECT_SQLRETURN macro: CarobException identification is now done in push_diag_chain() method instead. -------------------+ abstract_item.cpp | 13 +++++++++++-- abstract_item.hpp | 10 +++------- 2 files changed, 14 insertions(+), 9 deletions(-) Index: odbsequoia/src/abstract_item.cpp diff -u odbsequoia/src/abstract_item.cpp:1.7 odbsequoia/src/abstract_item.cpp:1.8 --- odbsequoia/src/abstract_item.cpp:1.7 Mon Jan 23 13:00:44 2006 +++ odbsequoia/src/abstract_item.cpp Wed Feb 8 18:21:12 2006 @@ -166,13 +166,22 @@ void -ODBCItem::push_diag_chain(const std::wstring& prefix, const CarobNS::CarobException& ce) +ODBCItem::push_diag_chain(const CarobNS::CarobException& head) { - for (const CarobNS::CarobException *current = &ce; + + std::wstring prefix = get_diagids(); + + // can't rethrow and catch, (even by pointer) because of slicing + if (0 != dynamic_cast<const CarobNS::BackendException*>(&head)) + prefix = get_backend_diagids(); + + for (const CarobNS::CarobException *current = &head; NULL != current; current = current->getNext()) + { diag_records.push_back( DiagRecord::DiagRecord(prefix, *current) ); + } } /* Index: odbsequoia/src/abstract_item.hpp diff -u odbsequoia/src/abstract_item.hpp:1.13 odbsequoia/src/abstract_item.hpp:1.14 --- odbsequoia/src/abstract_item.hpp:1.13 Wed Feb 8 16:45:30 2006 +++ odbsequoia/src/abstract_item.hpp Wed Feb 8 18:21:12 2006 @@ -38,14 +38,9 @@ #define _PROTECT_SQLRETURN(slf, method) \ try { return slf->method; } \ - catch (const BackendException& ce) \ - { \ - slf->push_diag_chain(slf->get_backend_diagids(), ce); \ - return SQL_ERROR; \ - } \ catch (const CarobException& ce) \ { \ - slf->push_diag_chain(slf->get_diagids(), ce); \ + slf->push_diag_chain(ce); \ return SQL_ERROR; \ } @@ -93,8 +88,9 @@ clear_diags() { diag_records.clear(); }; void - push_diag_chain(const std::wstring& prefix, const CarobNS::CarobException& ce); + push_diag_chain(const CarobNS::CarobException& ce); + // get___diagids() need to be public because we want to call: owner.get_diagids() /** Returns our own vendor and component IDs, used to prefix the diag message. */ virtual const std::wstring& get_diagids() const { return diagids; };
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS update of odbsequoia/src (abstract_item.hpp), marc-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
|---|---|
| Next by Date: | CVS update of libmysequoia (7 files), csaba-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Previous by Thread: | CVS update of odbsequoia/src (abstract_item.hpp), marc-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Next by Thread: | CVS update of libmysequoia (7 files), csaba-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home
| advertise | OSDir is
an inevitable website.
|