diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Exceptions.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Exceptions.cc b/lib/Exceptions.cc index 8a66e68..5c14404 100644 --- a/lib/Exceptions.cc +++ b/lib/Exceptions.cc @@ -49,7 +49,7 @@ char GeneralException::t[BUFSIZ]; std::vector<String> Base::context; -GeneralException::GeneralException(String emsg) : msg(emsg.strdup()) { +GeneralException::GeneralException(const String & emsg) : msg(emsg.strdup()) { UNLOCK; #ifdef DEBUG printm(M_BARE, String(_("Generating a General Exception error: '")) + msg + "'.\n"); @@ -83,13 +83,13 @@ MemoryException::MemoryException(ssize_t s) { msg = strdup(t); } -IOException::IOException(String fn, op_t op, ssize_t s) { +IOException::IOException(const String & fn, op_t op, ssize_t s) { 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); } -IOGeneral::IOGeneral(String fn) : GeneralException(fn) { } +IOGeneral::IOGeneral(const String & fn) : GeneralException(fn) { } IOGeneral::IOGeneral() { } |