Commit 64dd01ab authored by thomas.forbriger's avatar thomas.forbriger
Browse files

libs/libdatrwxx [FIX]: fix initialization of member data in Exception

Member data Mfile was initialized with numeric value 0. This was appropriate
when Mfile was of type char * which is no longer the case. Mfile now is of
type std::string and requires a character sequence as initializer.
parent 5a500f88
......@@ -28,11 +28,13 @@
*
* REVISIONS and CHANGES
* - 07/07/2016 V1.0 Thomas Forbriger
* - 17/05/2017 V1.1 bug fix: string members must be initialized with
* character sequence
*
* ============================================================================
*/
#define DATRW_EXCEPTION_CC_VERSION \
"DATRW_EXCEPTION_CC V1.0"
"DATRW_EXCEPTION_CC V1.1"
#include <iostream>
#include <datrwxx/exception.h>
......@@ -49,18 +51,18 @@ namespace datrw {
//! construct from nothing
Exception::Exception():
Mmessage(""), Mfile(0), Mline(0), Mcondition("")
Mmessage(""), Mfile(""), Mline(0), Mcondition("")
{ if (Mreport_on_construct) { report(); } }
//! construct with message
Exception::Exception(const std::string& message):
Mmessage(message), Mfile(0), Mline(0), Mcondition("")
Mmessage(message), Mfile(""), Mline(0), Mcondition("")
{ if (Mreport_on_construct) { report(); } }
//! construct with message and file info
Exception::Exception(const std::string& message,
const std::string& condition):
Mmessage(message), Mfile(0), Mline(0), Mcondition(condition)
Mmessage(message), Mfile(""), Mline(0), Mcondition(condition)
{ if (Mreport_on_construct) { report(); } }
//! construct with message and file info
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment