From 4f04a998e066b0f0149e1f86e7e104f272556895 Mon Sep 17 00:00:00 2001 From: Terraneo Federico <fede.tft@miosix.org> Date: Sun, 6 May 2018 17:27:05 +0200 Subject: [PATCH] Minor tweaks --- tscpp.cpp | 6 +----- tscpp.h | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tscpp.cpp b/tscpp.cpp index b078a8c..84496dd 100644 --- a/tscpp.cpp +++ b/tscpp.cpp @@ -160,11 +160,7 @@ void UnknownInputArchive::unserialize() auto pos=is.tellg(); string name; getline(is,name,'\0'); - if(is.eof()) - { - is.seekg(pos); - throw TscppException("eof"); - } + if(is.eof()) throw TscppException("eof"); tp.unserializeUnknownImpl(name,is,pos); } diff --git a/tscpp.h b/tscpp.h index 9b50702..0d0664d 100644 --- a/tscpp.h +++ b/tscpp.h @@ -346,6 +346,7 @@ public: * } catch(TscppException& ex) { * if(ex.name().empty()==false) * cerr<<"While unserializing Foo, "<<demangle(ex.name())<<" was found\n"; + * else cerr<<ex.what()<<endl; * } * \endcode * \return the serialized type name, or "" if eof was found -- GitLab