From 823761df28ad31cde8a071125b177f49494d804a Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 9 Nov 2001 14:06:58 +0000 Subject: Exceptions... --- lib/Exceptions.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/Exceptions.cc') diff --git a/lib/Exceptions.cc b/lib/Exceptions.cc index a4fca0f..9d2ba8e 100644 --- a/lib/Exceptions.cc +++ b/lib/Exceptions.cc @@ -38,7 +38,9 @@ IOGeneral::IOGeneral() { } IOAgain::IOAgain() : IOGeneral(_("No more bytes for reading or writing.")) { } -char * xstrdup(const char * s) throw (MemoryException) { +TaskSwitch::TaskSwitch() : GeneralException(_("Switching task in a non-tasked environnement")) { } + +char * xstrdup(const char * s) throw (GeneralException) { char * r; if (!(r = ::strdup(s))) { @@ -48,7 +50,7 @@ char * xstrdup(const char * s) throw (MemoryException) { return r; } -void * xmalloc(ssize_t s) throw (MemoryException) { +void * xmalloc(ssize_t s) throw (GeneralException) { void * r; if (!(r = ::malloc(s))) { @@ -60,7 +62,7 @@ void * xmalloc(ssize_t s) throw (MemoryException) { return r; } -void * xrealloc(void * ptr, size_t s) throw (MemoryException) { +void * xrealloc(void * ptr, size_t s) throw (GeneralException) { void * r; if (!(r = ::realloc(ptr, s))) { -- cgit v1.2.3