X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Fio%2FrecordHandler.cpp;h=f8c2185f395bdcba617e32d5e5410af74947549f;hb=e0713d1539887566e0ea7d85942c305ec727c9dd;hp=551b2c495144e04c4660bc95c45dacaef885bbb3;hpb=f8d1606423c351f2003ce18258ef047e0d2af326;p=cassiopeia.git diff --git a/src/io/recordHandler.cpp b/src/io/recordHandler.cpp index 551b2c4..f8c2185 100644 --- a/src/io/recordHandler.cpp +++ b/src/io/recordHandler.cpp @@ -75,8 +75,8 @@ public: RecordHeader head; std::string all = parseCommandChunked( head, io ); execute( static_cast( 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(); } }