diff options
Diffstat (limited to 'lib/Exceptions.cc')
-rw-r--r-- | lib/Exceptions.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Exceptions.cc b/lib/Exceptions.cc index 5c14404..a42f416 100644 --- a/lib/Exceptions.cc +++ b/lib/Exceptions.cc @@ -45,24 +45,22 @@ #include "generic.h" #include "gettext.h" -char GeneralException::t[BUFSIZ]; - std::vector<String> Base::context; GeneralException::GeneralException(const String & emsg) : msg(emsg.strdup()) { - UNLOCK; +// UNLOCK; #ifdef DEBUG printm(M_BARE, String(_("Generating a General Exception error: '")) + msg + "'.\n"); #endif } GeneralException::GeneralException() : msg(0) { - UNLOCK; +// UNLOCK; #ifdef DEBUG printm(M_BARE, String(_("Generating a General Exception error: '")) + msg + "'.\n"); #endif } GeneralException::GeneralException(const GeneralException & e) : msg(strdup(e.msg)) { - UNLOCK; +// UNLOCK; #ifdef DEBUG printm(M_BARE, String(_("Generating a General Exception error: '")) + msg + "'.\n"); #endif @@ -79,11 +77,13 @@ const char * GeneralException::GetMsg() const { } MemoryException::MemoryException(ssize_t s) { + char t[BUFSIZ]; sprintf(t, _("Failed allocating %u bytes."), s); msg = strdup(t); } IOException::IOException(const String & fn, op_t op, ssize_t s) { + char t[BUFSIZ]; sprintf(t, _("An error has occured while %s %u bytes on %s: %s"), op == IO_WRITE ? _("writing") : _("reading"), s, fn.to_charp(), strerror(errno)); msg = strdup(t); |