Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // File indented manually
- #include <iostream>
- #include <sstream>
- #include "Exception.h"
- #include "Error.h"
- namespace Package
- {
- // Constructor
- Exception::Exception(
- const std::string& _who,
- const std::string& _message,
- const TErrorCode& _errorCode)
- : who(_who)
- , message(_message)
- , errorCode(_errorCode)
- {
- // Do nothing
- }
- // Destructor
- Exception::~Exception() throw()
- {
- // Do nothing
- }
- // what
- const char* Exception::what() const throw()
- {
- std::ostringstream ossResult;
- ossResult << who << ": " << message;
- return ossResult.str().c_str();
- }
- // GetErrorCode
- TErrorCode Exception::GetErrorCode() const throw()
- {
- return errorCode;
- }
- }
- //////////
- //////////
- //////////
- // File indented with gg=G
- #include <iostream>
- #include <sstream>
- #include "Exception.h"
- #include "Error.h"
- namespace Package
- {
- // Constructor
- Exception::Exception(
- const std::string& _who,
- const std::string& _message,
- const TErrorCode& _errorCode)
- : who(_who)
- , message(_message)
- , errorCode(_errorCode)
- {
- // Do nothing
- }
- // Destructor
- Exception::~Exception() throw()
- {
- // Do nothing
- }
- // what
- const char* Exception::what() const throw()
- {
- std::ostringstream ossResult;
- ossResult << who << ": " << message;
- return ossResult.str().c_str();
- }
- // GetErrorCode
- TError Exception::GetErrorCode() const throw()
- {
- return errorCode;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement