Fix a memory leak caused by the constness of the exceptionCause string in Yerbacon::Exception
This commit is contained in:
parent
659cdf4e80
commit
c696b440e7
@ -18,7 +18,7 @@
|
|||||||
namespace Yerbacon {
|
namespace Yerbacon {
|
||||||
consteval const char* getVersion() noexcept { return YBCON_VERSION; }
|
consteval const char* getVersion() noexcept { return YBCON_VERSION; }
|
||||||
class Exception: public std::exception {
|
class Exception: public std::exception {
|
||||||
const std::string exceptionCause;
|
std::string exceptionCause;
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] const char* what() const noexcept final {
|
[[nodiscard]] const char* what() const noexcept final {
|
||||||
return exceptionCause.data();
|
return exceptionCause.data();
|
||||||
|
Loading…
Reference in New Issue
Block a user