[Avida-SVN] r2166 - branches/developers/avida-edward/source/tools

kaben at myxo.css.msu.edu kaben at myxo.css.msu.edu
Tue Oct 30 19:43:00 PDT 2007


Author: kaben
Date: 2007-10-30 22:43:00 -0400 (Tue, 30 Oct 2007)
New Revision: 2166

Added:
   branches/developers/avida-edward/source/tools/cException.h
Log:
Added missing file, present only in the Avida-ED developer branch. Part of code
to debug using exceptions.


Added: branches/developers/avida-edward/source/tools/cException.h
===================================================================
--- branches/developers/avida-edward/source/tools/cException.h	                        (rev 0)
+++ branches/developers/avida-edward/source/tools/cException.h	2007-10-31 02:43:00 UTC (rev 2166)
@@ -0,0 +1,17 @@
+#ifndef cException_h
+#define cException_h
+
+#include <exception>
+
+class cRandomDebugException : std::exception
+{
+  const char *m_msg;
+public:
+  cRandomDebugException(const char* msg = 0):m_msg(msg){}
+  virtual ~cRandomDebugException() throw() {}
+  virtual char const* what() const throw() {
+    return (m_msg)?(m_msg):("cRandomDebugException occurred.");
+  }
+};
+
+#endif /* cException_h */




More information about the Avida-cvs mailing list