]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Catch std::exception (instead of a more specific TextException) to catch
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 29 Sep 2008 07:46:55 +0000 (01:46 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 29 Sep 2008 07:46:55 +0000 (01:46 -0600)
more exceptions. We do not care what exception we actually caught anyway.

src/ICAP/ICAPModXact.cc
src/ICAP/ICAPModXact.h
src/http.cc

index f6c39d07442e28dc5a38dd5bf9e6567f5c2d0ff6..ff0412efdc0088e48105dcf7f78eb7bd7d19b69a 100644 (file)
@@ -566,7 +566,7 @@ void ICAPModXact::parseMore()
         parseBody();
 }
 
-void ICAPModXact::callException(const TextException &e)
+void ICAPModXact::callException(const std::exception &e)
 {
     if (!canStartBypass || isRetriable) {
         ICAPXaction::callException(e);
@@ -575,10 +575,10 @@ void ICAPModXact::callException(const TextException &e)
 
     try {
         debugs(93, 3, "bypassing ICAPModXact::" << inCall << " exception: " <<
-           e.message << ' ' << status());
+           e.what() << ' ' << status());
         bypassFailure();
     }
-    catch (const TextException &bypassE) {
+    catch (const std::exception &bypassE) {
         ICAPXaction::callException(bypassE);
     }
 }
index 9b60baa8662ff9d44932e9c92d0606c937b3aeb4..1c07fec3be64a9b7d39389b496fe009c05c8e892 100644 (file)
@@ -158,7 +158,7 @@ public:
 
 protected:
     // bypasses exceptions if needed and possible
-    virtual void callException(const TextException &e);
+    virtual void callException(const std::exception &e);
 
 private:
     virtual void start();
index 0db0fd268d25afeec7c691745c98a37dcefe579d..c940a4927d3996d6f273ce9d730729d62a3ba134 100644 (file)
@@ -62,8 +62,8 @@
 #define SQUID_EXIT_THROWING_CODE(status) \
        status = true; \
     } \
-    catch (const TextException &e) { \
-       debugs (11, 1, "Exception error:" << e.message); \
+    catch (const std::exception &e) { \
+       debugs (11, 1, "Exception error:" << e.what()); \
        status = false; \
     }