#include <string>\r
using std::string;\r
\r
-namespace GameServ
-{
- //! GameServ generic exceptions
- namespace Exceptions
- {
- //! Generic base exception for all GameServ related exceptions that occur
- /*!
- These generic exception allows applications and services to catch
- all exceptions in a generic way, and even pass them off to log files,
- etc. It's recommended that developers make use of the standard macros
- __FILE__ and __LINE__. You can compose exception error message strings
- using boost's format function coupled with boost::str like so:
- \code
- // Make a string
- str(format("Failed to jump rope at time of %1%:%2%") % hour % minute));
- \endcode
-
- Developers should use caution when adding exceptions. Exceptions are great
- for finding errors cross boundries, they shouldn't be used as interrupt handlers
- or methods to localize handling of error conditions.
- */
- class GameServException
- {
- public:
- //! Fully composed exception
- /*!
- Recommended construction for a GameServ exception that helps developers and
- support the most.
- \param ErrorMsg The custom error message to associated with the
- exception. Even though this is a reference, it's copied locally to
- the class.
- \param Filename The name of the source file, use the standard macro
- __FILE__
- \param SourceLine The line number that the error occurred on, use
- __LINE__
- */
- GameServException(const string &ErrorMsg, const char *Filename, int SourceLine);
-
- //! Partially composed exception
- /*!
- Generic message
- \param ErrorMsg The custom error message to associated with the
- exception. Even though this is a reference, it's copied locally to
- the class.
- */
- GameServException(const string &ErrorMsg);
-
- //! Generic exception
- /*!
- This is a generic GameServ exception constructor
- */
- GameServException(void);
-
- // Properties /////////////////////////////////////////////////////////////
-
- //! Property get: Error Message
- const string ErrorMessage(void) const;
-
- //! Property get: Source Filename
- const char *Filename(void) const;
-
- //! Property get: Source Line Number
- const int LineNumber(void) const;
-
- //! Property get: Builds a full error string
- const string VerboseError(void) const;
-
- private:
-
- string mErrorMsg;
- const char *mpFilename;
- int mLineNumber;
-
- };
- }
+namespace GameServ \r
+{ \r
+ //! GameServ generic exceptions\r
+ namespace Exceptions\r
+ {\r
+ //! Generic base exception for all GameServ related exceptions that occur\r
+ /*!\r
+ These generic exception allows applications and services to catch\r
+ all exceptions in a generic way, and even pass them off to log files, \r
+ etc. It's recommended that developers make use of the standard macros\r
+ __FILE__ and __LINE__. You can compose exception error message strings \r
+ using boost's format function coupled with boost::str like so:\r
+ \code\r
+ // Make a string\r
+ str(format("Failed to jump rope at time of %1%:%2%") % hour % minute));\r
+ \endcode\r
+\r
+ Developers should use caution when adding exceptions. Exceptions are great\r
+ for finding errors cross boundries, they shouldn't be used as interrupt handlers\r
+ or methods to localize handling of error conditions.\r
+ */\r
+ class GameServException\r
+ {\r
+ public:\r
+ //! Fully composed exception\r
+ /*!\r
+ Recommended construction for a GameServ exception that helps developers and\r
+ support the most.\r
+ \param ErrorMsg The custom error message to associated with the \r
+ exception. Even though this is a reference, it's copied locally to \r
+ the class.\r
+ \param Filename The name of the source file, use the standard macro\r
+ __FILE__\r
+ \param SourceLine The line number that the error occurred on, use\r
+ __LINE__\r
+ */\r
+ GameServException(const string &ErrorMsg, const char *Filename, int SourceLine);\r
+\r
+ //! Partially composed exception\r
+ /*!\r
+ Generic message\r
+ \param ErrorMsg The custom error message to associated with the \r
+ exception. Even though this is a reference, it's copied locally to \r
+ the class.\r
+ */\r
+ GameServException(const string &ErrorMsg);\r
+\r
+ //! Generic exception\r
+ /*!\r
+ This is a generic GameServ exception constructor\r
+ */\r
+ GameServException(void);\r
+\r
+ // Properties /////////////////////////////////////////////////////////////\r
+ \r
+ //! Property get: Error Message\r
+ const string ErrorMessage(void) const;\r
+\r
+ //! Property get: Source Filename\r
+ const char *Filename(void) const;\r
+\r
+ //! Property get: Source Line Number\r
+ const int LineNumber(void) const;\r
+\r
+ //! Property get: Builds a full error string\r
+ const string VerboseError(void) const;\r
+ \r
+ private:\r
+ \r
+ string mErrorMsg;\r
+ const char *mpFilename;\r
+ int mLineNumber;\r
+ \r
+ };\r
+ } \r
}\r
\r
#endif\r