-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
try to clean up exceptions more neatly
Slightly hackish approach to try to not get mangled error messages by temporaly separating threads in the error handler. Only works if they arrive with less than 200ms spacing, but that should cover most cases for patterns within pFIRE
- Loading branch information
Phil Tooley
committed
May 1, 2019
1 parent
ee7c7c5
commit 38ab253
Showing
6 changed files
with
146 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// | ||
// Copyright 2019 University of Sheffield | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include <petscsys.h> | ||
#include <boost/version.hpp> | ||
|
||
#ifdef USE_DCMTK | ||
#include <dcmtk/config/osconfig.h> | ||
#endif //USE_DCMTK | ||
|
||
#ifdef USE_OIIO | ||
#include <OpenImageIO/oiioversion.h> | ||
#endif //USE_OIIO | ||
|
||
#include "types.hpp" | ||
|
||
std::string get_version_string_petsc() | ||
{ | ||
integer major, minor, subminor; | ||
PetscGetVersionNumber(&major, &minor, &subminor, nullptr); | ||
|
||
return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(subminor); | ||
} | ||
|
||
std::string get_version_string_boost() | ||
{ | ||
// See "Boost Informational Macros" section of boost::config docs | ||
integer major = BOOST_VERSION / 100000; | ||
integer minor = (BOOST_VERSION / 100) % 1000; | ||
integer subminor = BOOST_VERSION % 100; | ||
|
||
return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(subminor); | ||
} | ||
|
||
#ifdef USE_DCMTK | ||
std::string get_version_string_dcmtk() | ||
{ | ||
return std::string(PACKAGE_VERSION); | ||
} | ||
#endif //USE_DCMTK | ||
|
||
#ifdef USE_OIIO | ||
std::string get_version_string_oiio() | ||
{ | ||
return std::to_string(OIIO_VERSION_MAJOR) + "." + std::to_string(OIIO_VERSION_MINOR) + "." | ||
+ std::to_string(OIIO_VERSION_PATCH); | ||
} | ||
#endif //USE_OIIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// Copyright 2019 University of Sheffield | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include <string> | ||
|
||
std::string get_version_string_petsc(); | ||
std::string get_version_string_boost(); | ||
|
||
#ifdef USE_DCMTK | ||
std::string get_version_string_dcmtk(); | ||
#endif //USE_DCMTK | ||
|
||
#ifdef USE_OIIO | ||
std::string get_version_string_oiio(); | ||
#endif //USE_OIIO |