]> WPIA git - cassiopeia.git/blobdiff - src/io/recordHandler.cpp
upd: only throwing exceptions now
[cassiopeia.git] / src / io / recordHandler.cpp
index 551b2c495144e04c4660bc95c45dacaef885bbb3..f8c2185f395bdcba617e32d5e5410af74947549f 100644 (file)
@@ -75,8 +75,8 @@ public:
             RecordHeader head;
             std::string all = parseCommandChunked( head, io );
             execute( static_cast<RecordHeader::SignerCommand>( head.command ), all );
-        } catch( const char* msg ) {
-            logger::error( "ERROR: ", msg );
+        } catch( const std::exception& msg ) {
+            logger::error( "ERROR: ", msg.what() );
             parent->reset();
             return;
         }
@@ -207,7 +207,7 @@ public:
             break;
 
         default:
-            throw "Unimplemented";
+            throw std::runtime_error("Unimplemented");
         }
     }
 };
@@ -228,7 +228,7 @@ void DefaultRecordHandler::handle() {
     }
     try {
         currentSession->work();
-    } catch( EOFException e ){
+    } catch( eof_exception e ){
         reset();
     }
 }