diff --git a/src/exceptions/BaseException.cpp b/src/exceptions/BaseException.cpp index ed28a918c..45f4a9bf8 100644 --- a/src/exceptions/BaseException.cpp +++ b/src/exceptions/BaseException.cpp @@ -18,7 +18,7 @@ namespace storm { // Intentionally left empty. } - const char* BaseException::what() const noexcept { + const char* BaseException::what() const NOEXCEPT { std::string errorString = this->stream.str(); char* result = new char[errorString.size() + 1]; result[errorString.size()] = '\0'; diff --git a/src/exceptions/BaseException.h b/src/exceptions/BaseException.h index aae0b208a..cfb97580d 100644 --- a/src/exceptions/BaseException.h +++ b/src/exceptions/BaseException.h @@ -4,6 +4,8 @@ #include #include +#include "utility/OsDetection.h" + namespace storm { namespace exceptions { @@ -39,7 +41,7 @@ namespace storm { * * @return The message associated with this exception. */ - virtual const char* what() const noexcept; + virtual const char* what() const NOEXCEPT override; protected: // This stream stores the message of this exception. diff --git a/src/models/AtomicPropositionsLabeling.h b/src/models/AtomicPropositionsLabeling.h index dfcc1db04..217e9bc7e 100644 --- a/src/models/AtomicPropositionsLabeling.h +++ b/src/models/AtomicPropositionsLabeling.h @@ -242,9 +242,14 @@ public: * @return True if the node is labeled with the atomic proposition, false otherwise. */ bool getStateHasAtomicProposition(std::string const& ap, const uint_fast64_t state) const { + if (ap == "true") { + return true; + } else if (ap == "false") { + return false; + } if (!this->containsAtomicProposition(ap)) { - LOG4CPLUS_ERROR(logger, "The atomic proposition " << ap << " is invalid for the labeling of the model."); - throw storm::exceptions::InvalidArgumentException() << "The atomic proposition " << ap << " is invalid for the labeling of the model."; + LOG4CPLUS_ERROR(logger, "The atomic proposition '" << ap << "' is invalid for the labeling of the model."); + throw storm::exceptions::InvalidArgumentException() << "The atomic proposition '" << ap << "' is invalid for the labeling of the model."; } auto apIndexPair = nameToLabelingMap.find(ap); return this->singleLabelings[apIndexPair->second].get(state); diff --git a/src/utility/OsDetection.h b/src/utility/OsDetection.h index 37be3f0e7..d91d5595e 100644 --- a/src/utility/OsDetection.h +++ b/src/utility/OsDetection.h @@ -3,6 +3,7 @@ #if defined __linux__ || defined __linux # define LINUX +# define NOEXCEPT noexcept # include # include #include // Required by ErrorHandling.h @@ -12,6 +13,7 @@ # define GetCurrentDir getcwd #elif defined TARGET_OS_MAC || defined __apple__ || defined __APPLE__ # define MACOSX +# define NOEXCEPT noexcept # define _DARWIN_USE_64_BIT_INODE # include # include @@ -22,6 +24,7 @@ # define GetCurrentDir getcwd #elif defined _WIN32 || defined _WIN64 # define WINDOWS +# define NOEXCEPT throw() # ifndef NOMINMAX # define NOMINMAX # undef min