-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from ArthanIRC/send-fixes
fix: failure in registration procedure is now protected
- Loading branch information
Showing
7 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
class PassCommand : public Command { | ||
private: | ||
Client* client; | ||
std::string _password; | ||
|
||
public: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
#pragma once | ||
|
||
#include <exception> | ||
#include <string> | ||
|
||
class ClientException : public std::exception {}; | ||
class RegFailedException : public std::exception {}; | ||
class RegFailedException : public std::exception { | ||
std::string _msg; | ||
|
||
public: | ||
RegFailedException(const std::string& msg) { | ||
this->_msg = "Error: Registration failed\n" + msg; | ||
} | ||
RegFailedException() { this->_msg = "Error: registration failed."; } | ||
virtual ~RegFailedException() throw() {} | ||
|
||
virtual const char* what() const throw() { return _msg.c_str(); } | ||
}; | ||
class ServerException : public std::exception {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters