You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2013/12/17 01:02:37 UTC

[2/2] git commit: TS-2434: use FATAL error level to handle plugin errors

TS-2434: use FATAL error level to handle plugin errors


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6ce376a8
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6ce376a8
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6ce376a8

Branch: refs/heads/master
Commit: 6ce376a8f2f027d329f4b1a1f79d75c1ed4a7dcf
Parents: 49bb787
Author: James Peach <jp...@apache.org>
Authored: Mon Dec 16 09:33:39 2013 -0800
Committer: James Peach <jp...@apache.org>
Committed: Mon Dec 16 16:02:08 2013 -0800

----------------------------------------------------------------------
 CHANGES         | 2 ++
 proxy/Plugin.cc | 7 ++-----
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6ce376a8/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index a0f5bb6..669fe9b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 4.2.0
 
+  *) [TS-2434] Use the FATAL error level to handle plugin errors.
+
   *) [TS-2203] Clarify syslog startup messages for standalone log programs.
 
   *) [TS-2436] Add a simple integration test harness.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6ce376a8/proxy/Plugin.cc
----------------------------------------------------------------------
diff --git a/proxy/Plugin.cc b/proxy/Plugin.cc
index 10ff423..b75fa52 100644
--- a/proxy/Plugin.cc
+++ b/proxy/Plugin.cc
@@ -120,8 +120,7 @@ plugin_load(int argc, char *argv[])
 
   handle = dll_open(path);
   if (!handle) {
-    Error("unable to load '%s': %s", path, dll_error(handle));
-    abort();
+    Fatal("unable to load '%s': %s", path, dll_error(handle));
   }
 
   // Allocate a new registration structure for the
@@ -132,9 +131,7 @@ plugin_load(int argc, char *argv[])
 
   init = (init_func_t) dll_findsym(handle, "TSPluginInit");
   if (!init) {
-    Error("unable to find TSPluginInit function '%s': %s", path, dll_error(handle));
-    dll_close(handle);
-    abort();
+    Fatal("unable to find TSPluginInit function '%s': %s", path, dll_error(handle));
   }
 
   // elevate the access to read files as root if compiled with capabilities, if not