PPCoin: Version number and rename checkpoint related constants
[novacoin.git] / src / serialize.h
index 8357c2e..61120fd 100644 (file)
@@ -65,6 +65,8 @@ static const int VERSION = 50100;
 static const char* pszSubVer = "";
 static const bool VERSION_IS_BETA = true;
 
+static const int PPCOIN_VERSION = 100;
+
 // Used to bypass the rule against non-const reference to temporary
 // where it makes sense with wrappers such as CFlatData or CTxDB
 template<typename T>
@@ -345,7 +347,7 @@ public:
     void Unserialize(Stream& s, int, int=0)
     {
         if (pstr == NULL)
-            throw std::ios_base::failure("CFixedFieldString::Unserialize : trying to unserialize to const string");
+            THROW_WITH_STACKTRACE(std::ios_base::failure("CFixedFieldString::Unserialize : trying to unserialize to const string"));
         char pszBuf[LEN+1];
         s.read(pszBuf, LEN);
         pszBuf[LEN] = '\0';
@@ -1039,7 +1041,7 @@ public:
     {
         state |= bits;
         if (state & exceptmask)
-            throw std::ios_base::failure(psz);
+            THROW_WITH_STACKTRACE(std::ios_base::failure(psz));
     }
 
     bool eof() const             { return size() == 0; }
@@ -1256,7 +1258,7 @@ public:
     {
         state |= bits;
         if (state & exceptmask)
-            throw std::ios_base::failure(psz);
+            THROW_WITH_STACKTRACE(std::ios_base::failure(psz));
     }
 
     bool fail() const            { return state & (std::ios::badbit | std::ios::failbit); }