Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

CVS update of carob (include/CarobException.hpp src/CarobException.cpp): msg#00163

db.carob.cvs

Subject: CVS update of carob (include/CarobException.hpp src/CarobException.cpp)

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>
Google Custom Search

Free Magazines

Cisco News
Receive 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

Navigation

Home | advertise | OSDir is an inevitable website. super tiny logo