Tomotaka SUWA
t-suw****@users*****
2005年 9月 24日 (土) 16:28:18 JST
Index: AquaSKK/CppMessagePortConnection.cpp diff -u AquaSKK/CppMessagePortConnection.cpp:1.1.1.2.2.1 AquaSKK/CppMessagePortConnection.cpp:1.1.1.2.2.2 --- AquaSKK/CppMessagePortConnection.cpp:1.1.1.2.2.1 Fri Sep 23 22:29:10 2005 +++ AquaSKK/CppMessagePortConnection.cpp Sat Sep 24 16:28:17 2005 @@ -1,5 +1,5 @@ /* - $Id: CppMessagePortConnection.cpp,v 1.1.1.2.2.1 2005/09/23 13:29:10 t-suwa Exp $ + $Id: CppMessagePortConnection.cpp,v 1.1.1.2.2.2 2005/09/24 07:28:17 t-suwa Exp $ --------- MacOS X implementation of the SKK input method. @@ -27,12 +27,24 @@ #include "CppCFData.h" #include "CppMessagePortConnection.h" +struct exception_CFMessagePortCreateRemote : public std::exception { + const char* what() const throw() { + return "AquaSKK: CFMessagePortCreateRemote() failed"; + } +}; + +struct exception_CFMessagePortSendRequest : public std::exception { + const char* what() const throw() { + return "AquaSKK: CFMessagePortSendRequest() failed"; + } +}; + CppMessagePortConnection::CppMessagePortConnection(const CppCFString& port) throw(std::exception) { port_ = CFMessagePortCreateRemote(NULL, port.getString()); if(port_ == NULL) { - throw std::exception(); + throw exception_CFMessagePortCreateRemote(); } } @@ -72,7 +84,7 @@ 10, // recv timeout replyMode, &replyData) != kCFMessagePortSuccess) { - throw std::exception(); + throw exception_CFMessagePortSendRequest(); } if(replyData != NULL) { @@ -89,7 +101,7 @@ 0, NULL, NULL) != kCFMessagePortSuccess) { - throw std::exception(); + throw exception_CFMessagePortSendRequest(); } } Index: AquaSKK/CppMessagePortServer.cpp diff -u AquaSKK/CppMessagePortServer.cpp:1.1.1.2.2.2 AquaSKK/CppMessagePortServer.cpp:1.1.1.2.2.3 --- AquaSKK/CppMessagePortServer.cpp:1.1.1.2.2.2 Sat Sep 24 09:29:33 2005 +++ AquaSKK/CppMessagePortServer.cpp Sat Sep 24 16:28:17 2005 @@ -1,5 +1,5 @@ /* - $Id: CppMessagePortServer.cpp,v 1.1.1.2.2.2 2005/09/24 00:29:33 t-suwa Exp $ + $Id: CppMessagePortServer.cpp,v 1.1.1.2.2.3 2005/09/24 07:28:17 t-suwa Exp $ --------- MacOS X implementation of the SKK input method. @@ -29,6 +29,12 @@ #include "PrivateRunLoop.h" #include "CppMessagePortServer.h" +struct exception_CFMessagePortCreateLocal : public std::exception { + const char* what() const throw() { + return "AquaSKK: CFMessagePortCreateLocal() failed"; + } +}; + CppMessagePortServer::CppMessagePortServer( const CppCFString& portName, const CFStringRef loopMode) throw(std::exception) @@ -48,7 +54,7 @@ &context, NULL); if(port == NULL) { - throw std::exception(); + throw exception_CFMessagePortCreateLocal(); } // RunLoop ðç¹é Index: AquaSKK/CppScrap.cpp diff -u AquaSKK/CppScrap.cpp:1.1.1.1.2.2 AquaSKK/CppScrap.cpp:1.1.1.1.2.3 --- AquaSKK/CppScrap.cpp:1.1.1.1.2.2 Sat Sep 24 09:29:33 2005 +++ AquaSKK/CppScrap.cpp Sat Sep 24 16:28:17 2005 @@ -55,6 +55,12 @@ } } +struct exception_CppScrapFlavor_content : public std::exception { + const char* what() const throw() { + return "AquaSKK: CppScrapFlavor::content() failed"; + } +}; + CppCFData CppScrapFlavor::content() const throw(std::exception) { if (exists()) { Size size = this->size(); @@ -66,6 +72,6 @@ return data; } else { - throw std::exception(); + throw exception_CppScrapFlavor_content(); } }