• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision5cf80bb97c38b41ea0c5b43fb7365ff654c52926 (tree)
Time2013-07-23 11:29:50
AuthorKatsuhiko Nishimra <ktns.87@gmai...>
CommiterKatsuhiko Nishimra

Log Message

Avoid exceptions while deserialization of exceptions. #31730

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1415 1136aad2-a195-0410-b898-f5ea1d11b9d8

Change Summary

Incremental Difference

--- a/src/base/MolDSException.cpp
+++ b/src/base/MolDSException.cpp
@@ -21,6 +21,7 @@
2121 #include<string>
2222 #include<stdexcept>
2323 #include<iostream>
24+#include<cctype>
2425 #include<boost/format.hpp>
2526 #include<boost/serialization/map.hpp>
2627 #include<boost/archive/text_iarchive.hpp>
@@ -171,6 +172,9 @@ MolDSException MolDSException::Deserialize(std::istream& is){
171172 ia >> p;
172173 sp.reset(p);
173174
175+ while(isspace(is.peek())){
176+ is.get();
177+ }
174178 while(!is.eof()){
175179 try{
176180 boost::archive::text_iarchive ia(is);
@@ -178,6 +182,9 @@ MolDSException MolDSException::Deserialize(std::istream& is){
178182 ia >> pnext;
179183 p->LastException()->nextException.reset(pnext);
180184 p = pnext;
185+ while(isspace(is.peek())){
186+ is.get();
187+ }
181188 }
182189 catch(...){
183190 p->LastException()->nextException.reset();