> the reason I'm writing are classes such as *Exception and
> *FatalClass:
>
>   
> http://ci.apache.org/projects/trafficserver/trunk/doxygen/classFileStatException.html
>   
> http://ci.apache.org/projects/trafficserver/trunk/doxygen/structMachineFatalClass.html
>
> Which aren't used anywhere in our code.

Which, of course, is moo-poo..

proxy/http/HttpAccept.cc:84:  MachineFatal("HTTP accept received fatal error: 
errno = %d", -((int)(intptr_t)data));
proxy/http/HttpProxyServerMain.cc:230:    ProcessFatal("accept port %d is not 
between 1 and 65535 ", "please check configuration", port);
proxy/Main.cc:803:      MachineFatal("too few file descritors (%d) available", 
fds_limit);
proxy/Main.cc:842:    ProcessFatal("Traffic Server must not be run as root");
proxy/Main.cc:1681:    ProcessFatal("unable to initialize storage, 
(Re)Configuration required\n");
proxy/Main.cc:1845:      ProcessFatal("\ncannot listen on port %d.\naccept port 
cannot be larger that 65535.\n"

The other three classes however (or their #defines) are not used RequestFatal, 
ProcessorFatal, ThreadFatal


The attached patch removes all Error.h includes from where they weren't needed.
It also removes ink_exception.h

Any objections to apply it?
This and other patches removing obviously unused classes/files?

i

--
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: [email protected]
URL: http://brainsware.org/
GPG: 571B 8B8A FC97 266D BDA3  EF6F 43AD 80A4 5779 3257
diff --git lib/ts/Makefile.am lib/ts/Makefile.am
index 6d15fb3..b7ed29d 100644
--- lib/ts/Makefile.am
+++ lib/ts/Makefile.am
@@ -61,7 +61,6 @@ libtsutil_la_SOURCES = \
   InkErrno.h \
   ink_error.cc \
   ink_error.h \
-  ink_exception.h \
   ink_file.cc \
   ink_file.h \
   ink_hash_table.cc \
diff --git lib/ts/ink_exception.h lib/ts/ink_exception.h
deleted file mode 100644
index 85b5d12..0000000
--- lib/ts/ink_exception.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/*
- *  ink_exception.h
- *
- *  Contains some global exception classes.
- *
- *  $Date: 2003-06-01 18:36:43 $
- *
- *
- */
-
-
-class Exception
-{
-};
-
-class OSException:public Exception
-{
-};
-
-class IOException:public OSException
-{
-};
-
-class FileOpenException:public IOException
-{
-};
-class FileStatException:public IOException
-{
-};
-class FileSeekException:public IOException
-{
-};
-class FileReadException:public IOException
-{
-};
-class FileWriteException:public IOException
-{
-};
-class FileCloseException:public IOException
-{
-};
-
-class MemoryMapException:public OSException
-{
-};
-class MemoryUnmapException:public OSException
-{
-};
diff --git lib/ts/libts.h lib/ts/libts.h
index cc98fb3..70defaa 100644
--- lib/ts/libts.h
+++ lib/ts/libts.h
@@ -55,7 +55,6 @@
 #include "ink_code.h"
 #include "ink_defs.h"
 #include "ink_error.h"
-#include "ink_exception.h"
 #include "ink_file.h"
 #include "ink_hash_table.h"
 #include "ink_hrtime.h"
diff --git proxy/CacheControl.cc proxy/CacheControl.cc
index 9e87e76..e441a53 100644
--- proxy/CacheControl.cc
+++ proxy/CacheControl.cc
@@ -42,7 +42,6 @@
 #include "CacheControl.h"
 #include "ControlMatcher.h"
 #include "Main.h"
-#include "Error.h"
 #include "P_EventSystem.h"
 #include "ProxyConfig.h"
 #include "HTTP.h"
diff --git proxy/Main.cc proxy/Main.cc
index 860b212..876ede4 100644
--- proxy/Main.cc
+++ proxy/Main.cc
@@ -49,8 +49,8 @@ extern "C" int plock(int);
 #endif
 
 #include "Main.h"
-#include "signals.h"
 #include "Error.h"
+#include "signals.h"
 #include "StatSystem.h"
 #include "P_EventSystem.h"
 #include "P_Net.h"
diff --git proxy/ParentSelection.cc proxy/ParentSelection.cc
index 5bebde4..a3bbae8 100644
--- proxy/ParentSelection.cc
+++ proxy/ParentSelection.cc
@@ -29,7 +29,6 @@
 #include "ParentSelection.h"
 #include "ControlMatcher.h"
 #include "Main.h"
-#include "Error.h"
 #include "ProxyConfig.h"
 #include "HTTP.h"
 #include "HttpTransact.h"
diff --git proxy/ProxyConfig.h proxy/ProxyConfig.h
index 40952a9..0d084cf 100644
--- proxy/ProxyConfig.h
+++ proxy/ProxyConfig.h
@@ -33,7 +33,6 @@
 
 #include "libts.h"
 #include "ProcessManager.h"
-#include "Error.h"
 
 void *config_int_cb(void *data, void *value);
 void *config_long_long_cb(void *data, void *value);
diff --git proxy/ReverseProxy.cc proxy/ReverseProxy.cc
index df3d23f..8297ddf 100644
--- proxy/ReverseProxy.cc
+++ proxy/ReverseProxy.cc
@@ -30,7 +30,6 @@
 #include "libts.h"
 #include <dlfcn.h>
 #include "Main.h"
-#include "Error.h"
 #include "P_EventSystem.h"
 #include "StatSystem.h"
 #include "P_Cache.h"
diff --git proxy/StatSystem.cc proxy/StatSystem.cc
index 6842c2d..e23faaf 100644
--- proxy/StatSystem.cc
+++ proxy/StatSystem.cc
@@ -29,7 +29,6 @@
 #include "Main.h"
 #include "StatSystem.h"
 #include "P_EventSystem.h"
-#include "Error.h"
 #include "ProcessManager.h"
 #include "ProxyConfig.h"
 #include "StatPages.h"
diff --git proxy/congest/CongestionTest.cc proxy/congest/CongestionTest.cc
index 79ab2cf..756cffc 100644
--- proxy/congest/CongestionTest.cc
+++ proxy/congest/CongestionTest.cc
@@ -32,7 +32,6 @@
 #include "Main.h"
 #include "CongestionDB.h"
 #include "Congestion.h"
-#include "Error.h"
 
 //-------------------------------------------------------------
 // Test the HashTable implementation
diff --git proxy/http/HttpAccept.cc proxy/http/HttpAccept.cc
index d91c829..499a5a6 100644
--- proxy/http/HttpAccept.cc
+++ proxy/http/HttpAccept.cc
@@ -25,6 +25,7 @@
 #include "IPAllow.h"
 #include "HttpClientSession.h"
 #include "I_Machine.h"
+#include "Error.h"
 
 
 int
diff --git proxy/http/HttpBodyFactory.h proxy/http/HttpBodyFactory.h
index 52ab68c..a3c01d9 100644
--- proxy/http/HttpBodyFactory.h
+++ proxy/http/HttpBodyFactory.h
@@ -62,7 +62,6 @@
 #include "HttpConfig.h"
 #include "HttpCompat.h"
 #include "HttpTransact.h"
-#include "Error.h"
 #include "Main.h"
 #include "RawHashTable.h"
 
diff --git proxy/http/HttpMessageBody.h proxy/http/HttpMessageBody.h
index ec94d04..c80a5b5 100644
--- proxy/http/HttpMessageBody.h
+++ proxy/http/HttpMessageBody.h
@@ -27,7 +27,6 @@
 #include "libts.h"
 #include "HTTP.h"
 #include "HttpConfig.h"
-#include "Error.h"
 #include "Main.h"
 
 class HttpMessageBody
diff --git proxy/http/HttpProxyServerMain.cc proxy/http/HttpProxyServerMain.cc
index 217673b..d734b11 100644
--- proxy/http/HttpProxyServerMain.cc
+++ proxy/http/HttpProxyServerMain.cc
@@ -23,8 +23,8 @@
 
 #include "ink_config.h"
 #include "P_Net.h"
-#include "Main.h"
 #include "Error.h"
+#include "Main.h"
 #include "HttpConfig.h"
 #include "HttpAccept.h"
 #include "ReverseProxy.h"
diff --git proxy/http/HttpTransact.cc proxy/http/HttpTransact.cc
index f8f57d0..68eac75 100644
--- proxy/http/HttpTransact.cc
+++ proxy/http/HttpTransact.cc
@@ -39,7 +39,6 @@
 #include "MimeTable.h"
 #include "logging/Log.h"
 #include "logging/LogUtils.h"
-#include "Error.h"
 #include "CacheControl.h"
 #include "ControlMatcher.h"
 #include "ReverseProxy.h"
diff --git proxy/http/HttpTransactCache.cc proxy/http/HttpTransactCache.cc
index 01c0f7c..50e369f 100644
--- proxy/http/HttpTransactCache.cc
+++ proxy/http/HttpTransactCache.cc
@@ -30,7 +30,6 @@
 #include "HTTP.h"
 #include "HttpCompat.h"
 #include "HttpMessageBody.h"
-#include "Error.h"
 #include "InkErrno.h"
 
 ClassAllocator<CacheLookupHttpConfig> CacheLookupHttpConfigAllocator("CacheLookupHttpConfigAllocator");
diff --git proxy/http/remap/AclFiltering.cc proxy/http/remap/AclFiltering.cc
index f4dc153..7390e7c 100644
--- proxy/http/remap/AclFiltering.cc
+++ proxy/http/remap/AclFiltering.cc
@@ -23,7 +23,6 @@
 
 #include "AclFiltering.h"
 #include "Main.h"
-#include "Error.h"
 
 // ===============================================================================
 //                              acl_filter_rule
diff --git proxy/http/remap/StringHash.cc proxy/http/remap/StringHash.cc
index 85969db..3df6a38 100644
--- proxy/http/remap/StringHash.cc
+++ proxy/http/remap/StringHash.cc
@@ -22,7 +22,7 @@
  */
 
 #include "StringHash.h"
-#include "Error.h"
+#include "ink_string.h"
 
 
 // ===============================================================================
diff --git proxy/http/remap/UrlMapping.h proxy/http/remap/UrlMapping.h
index cb3b0fc..65ba986 100644
--- proxy/http/remap/UrlMapping.h
+++ proxy/http/remap/UrlMapping.h
@@ -26,7 +26,6 @@
 
 #include "AclFiltering.h"
 #include "Main.h"
-#include "Error.h"
 #include "URL.h"
 #include "RemapPluginInfo.h"
 
diff --git proxy/http/remap/UrlRewrite.cc proxy/http/remap/UrlRewrite.cc
index 15767f3..2f631e9 100644
--- proxy/http/remap/UrlRewrite.cc
+++ proxy/http/remap/UrlRewrite.cc
@@ -23,7 +23,6 @@
 
 #include "UrlRewrite.h"
 #include "Main.h"
-#include "Error.h"
 #include "P_EventSystem.h"
 #include "StatSystem.h"
 #include "P_Cache.h"
diff --git proxy/logging/Log.cc proxy/logging/Log.cc
index 2b87a42..4d6df1f 100644
--- proxy/logging/Log.cc
+++ proxy/logging/Log.cc
@@ -36,7 +36,6 @@
  ***************************************************************************/
 #include "libts.h"
 
-#include "Error.h"
 #include "Main.h"
 #include "P_EventSystem.h"
 #include "P_Net.h"
diff --git proxy/logging/LogAccess.cc proxy/logging/LogAccess.cc
index 78c0ef2..cbfab84 100644
--- proxy/logging/LogAccess.cc
+++ proxy/logging/LogAccess.cc
@@ -36,7 +36,6 @@
 
 #include "libts.h"
 
-#include "Error.h"
 #include "HTTP.h"
 
 #include "P_Net.h"
diff --git proxy/logging/LogAccessHttp.cc proxy/logging/LogAccessHttp.cc
index c6c0a30..ab0efda 100644
--- proxy/logging/LogAccessHttp.cc
+++ proxy/logging/LogAccessHttp.cc
@@ -33,7 +33,6 @@
 #include "ink_unused.h"
 
 #include "libts.h"
-#include "Error.h"
 #include "LogAccessHttp.h"
 #include "http/HttpSM.h"
 #include "MIME.h"
diff --git proxy/logging/LogAccessICP.cc proxy/logging/LogAccessICP.cc
index 26295a9..cf763ef 100644
--- proxy/logging/LogAccessICP.cc
+++ proxy/logging/LogAccessICP.cc
@@ -33,7 +33,6 @@
  ***************************************************************************/
 #ifndef TS_MICRO
 #include "libts.h"
-#include "Error.h"
 #include "HTTP.h"
 #include "ICP.h"
 #include "ICPlog.h"
diff --git proxy/logging/LogBuffer.cc proxy/logging/LogBuffer.cc
index 6c12d26..d3264e7 100644
--- proxy/logging/LogBuffer.cc
+++ proxy/logging/LogBuffer.cc
@@ -34,7 +34,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "Error.h"
 #include "P_EventSystem.h"
 #include "LogField.h"
 #include "LogFilter.h"
diff --git proxy/logging/LogField.cc proxy/logging/LogField.cc
index bfa6eb9..f13003f 100644
--- proxy/logging/LogField.cc
+++ proxy/logging/LogField.cc
@@ -29,7 +29,6 @@
  ***************************************************************************/
 #include "libts.h"
 
-#include "Error.h"
 #include "Resource.h"
 #include "LogUtils.h"
 #include "LogField.h"
diff --git proxy/logging/LogFile.cc proxy/logging/LogFile.cc
index 3ef8438..45001fe 100644
--- proxy/logging/LogFile.cc
+++ proxy/logging/LogFile.cc
@@ -35,8 +35,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#include "Error.h"
-
 #include "P_EventSystem.h"
 #include "I_Machine.h"
 #include "LogSock.h"
diff --git proxy/logging/LogFilter.cc proxy/logging/LogFilter.cc
index 835031b..d08116f 100644
--- proxy/logging/LogFilter.cc
+++ proxy/logging/LogFilter.cc
@@ -29,7 +29,6 @@
 #include "libts.h"
 
 #include "Resource.h"
-#include "Error.h"
 #include "LogUtils.h"
 #include "LogFilter.h"
 #include "LogField.h"
diff --git proxy/logging/LogFormat.cc proxy/logging/LogFormat.cc
index 855a58a..fd92ea8 100644
--- proxy/logging/LogFormat.cc
+++ proxy/logging/LogFormat.cc
@@ -36,7 +36,6 @@
 
 #include "INK_MD5.h"
 
-#include "Error.h"
 #include "SimpleTokenizer.h"
 
 #include "LogUtils.h"
diff --git proxy/logging/LogHost.cc proxy/logging/LogHost.cc
index 6ae3050..45bc3d0 100644
--- proxy/logging/LogHost.cc
+++ proxy/logging/LogHost.cc
@@ -29,7 +29,6 @@
 #include "libts.h"
 
 #include "Resource.h"
-#include "Error.h"
 
 #include "LogUtils.h"
 #include "LogSock.h"
diff --git proxy/logging/LogObject.cc proxy/logging/LogObject.cc
index 9c23c8b..752df72 100644
--- proxy/logging/LogObject.cc
+++ proxy/logging/LogObject.cc
@@ -29,7 +29,6 @@
 #include "libts.h"
 
 
-#include "Error.h"
 #include "P_EventSystem.h"
 #include "LogUtils.h"
 #include "LogField.h"
diff --git proxy/logging/LogSock.cc proxy/logging/LogSock.cc
index 6f968e6..db1dbad 100644
--- proxy/logging/LogSock.cc
+++ proxy/logging/LogSock.cc
@@ -24,7 +24,6 @@
 #include "ink_unused.h"
 
 #include "P_EventSystem.h"
-#include "Error.h"
 
 #include "LogSock.h"
 #include "LogUtils.h"
diff --git proxy/logging/LogStandalone.cc proxy/logging/LogStandalone.cc
index 9401fe2..915be4e 100644
--- proxy/logging/LogStandalone.cc
+++ proxy/logging/LogStandalone.cc
@@ -33,7 +33,6 @@
 #include "DiagsConfig.h"
 #include "Main.h"
 
-#include "Error.h"
 #include "P_EventSystem.h"
 #include "P_RecProcess.h"
 

Reply via email to