Switch exception class, seems to fail on some gcc versions.
authorScott Cantor <cantor.2@osu.edu>
Mon, 22 Oct 2007 01:32:14 +0000 (01:32 +0000)
committerScott Cantor <cantor.2@osu.edu>
Mon, 22 Oct 2007 01:32:14 +0000 (01:32 +0000)
fastcgi/shibauthorizer.cpp
fastcgi/shibresponder.cpp
shibsp/handler/impl/StatusHandler.cpp

index 5395172..14a232c 100644 (file)
@@ -166,7 +166,7 @@ public:
         return FCGX_GetParam("QUERY_STRING", m_req->envp);\r
     }\r
     const char* getRequestBody() const {\r
-        throw exception("getRequestBody not implemented by FastCGI authorizer.");\r
+        throw runtime_error("getRequestBody not implemented by FastCGI authorizer.");\r
     }\r
  \r
     long sendResponse(istream& in, long status) {\r
index 4cab35d..be45e48 100644 (file)
@@ -206,15 +206,15 @@ public:
     // Not used in the extension.\r
 \r
     virtual void clearHeader(const char* rawname, const char* cginame) {\r
-        throw exception("clearHeader not implemented by FastCGI responder.");\r
+        throw runtime_error("clearHeader not implemented by FastCGI responder.");\r
     }\r
   \r
     virtual void setHeader(const char* name, const char* value) {\r
-        throw exception("setHeader not implemented by FastCGI responder.");\r
+        throw runtime_error("setHeader not implemented by FastCGI responder.");\r
     }\r
 \r
     virtual void setRemoteUser(const char* user) {\r
-        throw exception("setRemoteUser not implemented by FastCGI responder.");\r
+        throw runtime_error("setRemoteUser not implemented by FastCGI responder.");\r
     }\r
 };\r
 \r
index 8ce18ec..cffb604 100644 (file)
@@ -113,7 +113,7 @@ namespace shibsp {
             }
             else
 #endif
-                throw exception("Target parameter was not an absolute URL.");
+                throw invalid_argument("Target parameter was not an absolute URL.");
 
             m_query = strchr(url,'?');
             if (m_query)
@@ -142,26 +142,26 @@ namespace shibsp {
         const char* getScheme() const {
             return m_scheme;
         }
-        const char* getHostname() const {\r
-            return m_hostname.c_str();\r
-        }\r
-        int getPort() const {\r
-            return m_port;\r
-        }\r
-        const char* getRequestURI() const {\r
-            return m_uri.c_str();\r
-        }\r
-        const char* getMethod() const {\r
-            return "GET";\r
-        }\r
-        string getContentType() const {\r
-            return "";\r
-        }\r
-        long getContentLength() const {\r
-            return 0;\r
-        }\r
-        string getRemoteAddr() const {\r
-            return "";\r
+        const char* getHostname() const {
+            return m_hostname.c_str();
+        }
+        int getPort() const {
+            return m_port;
+        }
+        const char* getRequestURI() const {
+            return m_uri.c_str();
+        }
+        const char* getMethod() const {
+            return "GET";
+        }
+        string getContentType() const {
+            return "";
+        }
+        long getContentLength() const {
+            return 0;
+        }
+        string getRemoteAddr() const {
+            return "";
         }
         string getRemoteUser() const {
             return "";
@@ -208,10 +208,10 @@ namespace shibsp {
     private:
         mutable CGIParser* m_parser;
         const char* m_url;
-        const char* m_scheme;\r
-        const char* m_query;\r
-        int m_port;\r
-        string m_hostname,m_uri;\r
+        const char* m_scheme;
+        const char* m_query;
+        int m_port;
+        string m_hostname,m_uri;
     };
 };