Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 430b9da
Showing
3 changed files
with
523 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// X11Exception.h | ||
// C++ exception that wraps X11 errors. | ||
// Copyright (C) 2008 Jay Bromley <jbromley@gmail.com> | ||
// | ||
// $Id: X11Exception.h 26 2008-04-09 08:47:11Z jay $ | ||
|
||
#ifndef X11EXCEPTION_H_FE39A315_6827_447B_AE62_5FA2C3FD391F | ||
#define X11EXCEPTION_H_FE39A315_6827_447B_AE62_5FA2C3FD391F | ||
|
||
#include <exception> | ||
|
||
class X11Exception : public std::exception | ||
{ | ||
public: | ||
X11Exception() : _reason("unknown") {} | ||
X11Exception(const std::string& what) : _reason(what) {} | ||
virtual ~X11Exception() throw () {}; | ||
virtual const char* what() const throw () { return _reason.c_str(); } | ||
|
||
private: | ||
std::string _reason; | ||
}; | ||
|
||
#endif // GAMEEXCEPTION_H_FE39A315_6827_447B_AE62_5FA2C3FD391F | ||
|
||
// Local Variables: | ||
// mode: c++ | ||
// End: | ||
|
Oops, something went wrong.