Skip to content

Commit

Permalink
Original XKeyboard class
Browse files Browse the repository at this point in the history
  • Loading branch information
nonpop committed Jan 2, 2010
0 parents commit 430b9da
Show file tree
Hide file tree
Showing 3 changed files with 523 additions and 0 deletions.
29 changes: 29 additions & 0 deletions X11Exception.h
@@ -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:

0 comments on commit 430b9da

Please sign in to comment.