exception with stringview

This commit is contained in:
Joachim Schoeberl 2024-07-17 12:01:59 +02:00
parent b6b20be30b
commit 357ff7badf
2 changed files with 11 additions and 0 deletions

View File

@ -22,6 +22,15 @@ namespace ngcore
} }
Exception :: Exception(std::string_view s1, std::string_view s2)
: Exception(std::string(s1)+std::string(s2))
{ }
Exception :: Exception(std::string_view s1, std::string_view s2, std::string_view s3)
: Exception(std::string(s1)+std::string(s2)+std::string(s3))
{ }
RangeException :: RangeException (// const std::string & where, RangeException :: RangeException (// const std::string & where,
const char * where, const char * where,
int ind, int imin, int imax) : Exception("") int ind, int imin, int imax) : Exception("")

View File

@ -32,6 +32,8 @@ namespace ngcore
Exception(Exception&&) = default; Exception(Exception&&) = default;
Exception(const std::string& s); // : m_what(s) {} Exception(const std::string& s); // : m_what(s) {}
Exception(const char* s); // : m_what(s) {} Exception(const char* s); // : m_what(s) {}
Exception(std::string_view s1, std::string_view s2);
Exception(std::string_view s1, std::string_view s2, std::string_view s3);
~Exception() override = default; ~Exception() override = default;
Exception& operator =(const Exception&) = default; Exception& operator =(const Exception&) = default;