|
|
Choosing A Webhost: |
CVS update of carob (include/CarobException.hpp src/CarobException.cpp): msg#00163db.carob.cvs
Date: Wednesday, January 25, 2006 @ 18:16:00 Author: marc Path: /cvsroot/carob/carob Modified: include/CarobException.hpp (1.32 -> 1.33) src/CarobException.cpp (1.16 -> 1.17) Redefined BackTrace default ctor to always get the current backtrace. (BackTrace now extends std::vector<std::string> instead of being just a typedef) ----------------------------+ include/CarobException.hpp | 10 +++++++--- src/CarobException.cpp | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) Index: carob/include/CarobException.hpp diff -u carob/include/CarobException.hpp:1.32 carob/include/CarobException.hpp:1.33 --- carob/include/CarobException.hpp:1.32 Fri Jan 13 16:40:53 2006 +++ carob/include/CarobException.hpp Wed Jan 25 18:16:00 2006 @@ -30,11 +30,15 @@ namespace CarobNS { class StackTraceElement; -class CarobException; class DriverSocket; -// TODO: convert this to wstring (for uniformity reasons) -typedef std::vector<std::string> BackTrace; + // redefine the default ctor to get the current backtrace +class BackTrace : public std::vector<std::string> +{ +public: + BackTrace(); + BackTrace(size_type n) : std::vector<std::string>(n) { } ; +}; typedef std::vector<StackTraceElement> StackTrace; Index: carob/src/CarobException.cpp diff -u carob/src/CarobException.cpp:1.16 carob/src/CarobException.cpp:1.17 --- carob/src/CarobException.cpp:1.16 Fri Jan 13 16:40:53 2006 +++ carob/src/CarobException.cpp Wed Jan 25 18:16:00 2006 @@ -37,7 +37,7 @@ /** constructs the BackTrace of the current place */ static BackTrace currentBackTrace() { - BackTrace bt; + BackTrace bt(0); #ifdef GLIB_BACKTRACE void * stack_pointers[100]; @@ -51,6 +51,8 @@ return bt; } +BackTrace::BackTrace() : std::vector<std::string>(currentBackTrace()) +{ }; CarobException::~CarobException() {
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS update of carob/test/10-Connection (TestConnect.cpp), gilles-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
|---|---|
| Next by Date: | CVS update of carob (include/CarobException.hpp src/CarobException.cpp), marc-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Previous by Thread: | CVS update of carob (include/CarobException.hpp src/CarobException.cpp), marc-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Next by Thread: | CVS update of carob (include/CarobException.hpp src/CarobException.cpp), marc-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.
|