Revision | 5cf80bb97c38b41ea0c5b43fb7365ff654c52926 (tree) |
---|---|
Zeit | 2013-07-23 11:29:50 |
Autor | Katsuhiko Nishimra <ktns.87@gmai...> |
Commiter | Katsuhiko Nishimra |
Avoid exceptions while deserialization of exceptions. #31730
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1415 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -21,6 +21,7 @@ | ||
21 | 21 | #include<string> |
22 | 22 | #include<stdexcept> |
23 | 23 | #include<iostream> |
24 | +#include<cctype> | |
24 | 25 | #include<boost/format.hpp> |
25 | 26 | #include<boost/serialization/map.hpp> |
26 | 27 | #include<boost/archive/text_iarchive.hpp> |
@@ -171,6 +172,9 @@ MolDSException MolDSException::Deserialize(std::istream& is){ | ||
171 | 172 | ia >> p; |
172 | 173 | sp.reset(p); |
173 | 174 | |
175 | + while(isspace(is.peek())){ | |
176 | + is.get(); | |
177 | + } | |
174 | 178 | while(!is.eof()){ |
175 | 179 | try{ |
176 | 180 | boost::archive::text_iarchive ia(is); |
@@ -178,6 +182,9 @@ MolDSException MolDSException::Deserialize(std::istream& is){ | ||
178 | 182 | ia >> pnext; |
179 | 183 | p->LastException()->nextException.reset(pnext); |
180 | 184 | p = pnext; |
185 | + while(isspace(is.peek())){ | |
186 | + is.get(); | |
187 | + } | |
181 | 188 | } |
182 | 189 | catch(...){ |
183 | 190 | p->LastException()->nextException.reset(); |