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