Remove a redundant public section in Yerbacon::Exception and make the second constructor call the first one

This commit is contained in:
Username404 2021-10-02 13:33:50 +02:00
parent f0aeda7c8a
commit 57a01e6c32
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 2 deletions

View File

@ -31,9 +31,8 @@ namespace Yerbacon {
[[nodiscard]] const char* what() const noexcept final { [[nodiscard]] const char* what() const noexcept final {
return exceptionCause.data(); return exceptionCause.data();
} }
public:
explicit Exception(const std::string_view& cause): exceptionCause(cause) {} explicit Exception(const std::string_view& cause): exceptionCause(cause) {}
Exception(const std::string_view& cause, unsigned long line): exceptionCause(('L' + std::to_string(line) + ": ").append(cause)) {} Exception(const std::string_view& cause, unsigned long line): Exception(('L' + std::to_string(line) + ": ").append(cause)) {}
}; };
} }