src/proto2/Application.cc
branchno-netsession
changeset 36 785d220fc6b7
parent 35 e21cfda0edde
child 38 4189b8bf3a5b
--- a/src/proto2/Application.cc	Tue Nov 18 22:58:50 2008 +0000
+++ b/src/proto2/Application.cc	Thu Nov 20 19:25:56 2008 +0000
@@ -1,5 +1,6 @@
 
 #include "Engine.hh"
+#include "Error.hh"
 
 #include <stdexcept>
 #include <cassert>
@@ -7,16 +8,9 @@
 #include <ClanLib/core.h>
 #include <ClanLib/application.h>
 
-class ArgumentError : public std::exception {
-    private:
-        const char *message;
-    
+class ArgumentError : public Error {
     public:
-        ArgumentError (const std::string &message) : message(message.c_str()) { }
-
-        virtual const char* what() const throw() {
-            return message;
-        }
+        ArgumentError (const std::string &message) : Error(message) { }
 };
 
 class Main : public CL_ClanApplication {