We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c426de4 commit 8fa63cfCopy full SHA for 8fa63cf
Release/include/cpprest/details/SafeInt3.hpp
@@ -664,9 +664,17 @@ namespace safeint3
664
#define SAFEINT_WEAK
665
#endif
666
667
-class SAFEINT_VISIBLE SafeIntException
+class SAFEINT_VISIBLE SafeIntException : public std::exception
668
{
669
public:
670
+ virtual const char* what() const {
671
+ if (m_code == SafeIntDivideByZero)
672
+ return "SafeIntException(SafeIntDivideByZero)";
673
+ if (m_code == SafeIntArithmeticOverflow)
674
+ return "SafeIntException(SafeIntArithmeticOverflow)";
675
+ return "SafeIntException(?)";
676
+ }
677
+
678
SafeIntException() SAFEINT_NOTHROW { m_code = SafeIntNoError; }
679
SafeIntException( SafeIntError code ) SAFEINT_NOTHROW
680
0 commit comments