bugfixes in laerror
This commit is contained in:
1 parent
31671ce204
commit
40a77a8762
1 file changed
+4
-2
@@ -18,6 +18,7 @@
|
|||||||
#ifndef _LAERROR_H_
|
#ifndef _LAERROR_H_
|
||||||
#define _LAERROR_H_
|
#define _LAERROR_H_
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
@@ -36,8 +37,9 @@ extern bool _LA_count_check; //intentionally not const
|
|||||||
class LAerror : public std::exception
|
class LAerror : public std::exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const char *msg;
|
std::string msg; //own copy: the argument may be a local buffer of an error handler
|
||||||
LAerror(const char *s) {msg=s;};
|
LAerror(const char *s) : msg(s?s:"unspecified") {};
|
||||||
|
const char *what() const noexcept {return msg.c_str();};
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
|
|||||||
Reference in new issue
Block a user