aboutsummaryrefslogtreecommitdiff
path: root/src/exceptionbase.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-01-27 08:43:21 +0000
committerMike Buland <eichlan@xagasoft.com>2007-01-27 08:43:21 +0000
commit603f45fbe9c3e0ac511425a13bbb19b87495bb4e (patch)
tree9245c365fff8a2c05e3c4beef31aaff28c590668 /src/exceptionbase.cpp
parent9aad98489f7bbf78418dcba4a5faf673b58843cb (diff)
downloadlibbu++-603f45fbe9c3e0ac511425a13bbb19b87495bb4e.tar.gz
libbu++-603f45fbe9c3e0ac511425a13bbb19b87495bb4e.tar.bz2
libbu++-603f45fbe9c3e0ac511425a13bbb19b87495bb4e.tar.xz
libbu++-603f45fbe9c3e0ac511425a13bbb19b87495bb4e.zip
Added a function to make the Base Exception class a little friendlier.
Diffstat (limited to 'src/exceptionbase.cpp')
-rw-r--r--src/exceptionbase.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/exceptionbase.cpp b/src/exceptionbase.cpp
index a9b9820..f3d22da 100644
--- a/src/exceptionbase.cpp
+++ b/src/exceptionbase.cpp
@@ -48,6 +48,16 @@ void ExceptionBase::setWhat( const char *lpFormat, va_list &vargs )
48 vsnprintf( sWhat, nSize+1, lpFormat, vargs ); 48 vsnprintf( sWhat, nSize+1, lpFormat, vargs );
49} 49}
50 50
51void ExceptionBase::setWhat( const char *lpText )
52{
53 if( sWhat ) delete[] sWhat;
54 int nSize;
55
56 nSize = strlen( lpText );
57 sWhat = new char[nSize+1];
58 strcpy( sWhat, lpText );
59}
60
51const char *ExceptionBase::what() const throw() 61const char *ExceptionBase::what() const throw()
52{ 62{
53 return sWhat; 63 return sWhat;