fix(Exception): static assert to make sure that _HAS_EXCEPTIONS is set (#4668).

This commit is contained in:
Matej Kenda 2024-10-04 10:28:44 +02:00
parent aab4058bae
commit 3c01eec7cf

View File

@ -100,9 +100,15 @@ protected:
private:
std::string _msg;
Exception* _pNested;
int _code;
int _code;
};
#if defined(_HAS_EXCEPTIONS)
// Size of Poco::Exception depends on the exception settings (like _HAS_EXCEPTIONS)
// that might influence size of std::exception from which Poco::Exception is derived from.
// It is expected that Poco libraries and application using Poco have the same settings.
static_assert(_HAS_EXCEPTIONS != 0);
#endif
//
// inlines