mirror of
https://github.com/NGSolve/netgen.git
synced 2025-05-10 12:40:49 +05:00
add try-catch
This commit is contained in:
parent
1d979cc16f
commit
9e28b04e33
@ -18,6 +18,7 @@ namespace ngcore
|
|||||||
VersionInfo() = default;
|
VersionInfo() = default;
|
||||||
VersionInfo(std::string vstring)
|
VersionInfo(std::string vstring)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
minor_ = release = patch = 0;
|
minor_ = release = patch = 0;
|
||||||
git_hash = "";
|
git_hash = "";
|
||||||
if(vstring.substr(0,1) == "v")
|
if(vstring.substr(0,1) == "v")
|
||||||
@ -49,6 +50,9 @@ namespace ngcore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (std::invalid_argument&)
|
||||||
|
{}
|
||||||
}
|
}
|
||||||
VersionInfo(const char* cstr) : VersionInfo(std::string(cstr)) { }
|
VersionInfo(const char* cstr) : VersionInfo(std::string(cstr)) { }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user