Change throws to asserts. If any of this stuff happens it means a code logic error or a retarded computer, so throwing it is just a waste of time.

This commit is contained in:
mpc
2004-07-01 09:17:17 +00:00
committed by zzz
parent f51e064cf6
commit 2b951e3f61
6 changed files with 71 additions and 106 deletions

View File

@@ -32,24 +32,24 @@
#define SOCKET_HPP
namespace Libsockthread {
class Socket {
public:
Socket(int type); // throws Socket error
public:
Socket(int type); // throws Socket error
void func(void);
private:
void func(void);
private:
#ifdef WINSOCK
void winsock_cleanup(void);
void winsock_startup(void); // throws Socket_error
const char* Socket::winsock_strerror(int code);
void winsock_cleanup(void);
void winsock_startup(void); // throws Socket_error
const char* winsock_strerror(int code);
#endif
};
class Socket_error : public runtime_error {
Socket_error(const string& s) : runtime_error(s) { }
public:
Socket_error(const string& s)
: runtime_error(s) { }
};
}
#endif // MUTEX_HPP