couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r1036954 - /couchdb/trunk/src/couchdb/couch_os_process.erl
Date Fri, 19 Nov 2010 17:23:41 GMT
Author: kocolosk
Date: Fri Nov 19 17:23:40 2010
New Revision: 1036954

URL: http://svn.apache.org/viewvc?rev=1036954&view=rev
Log:
prevent non-fatal errors from killing the OS process

Modified:
    couchdb/trunk/src/couchdb/couch_os_process.erl

Modified: couchdb/trunk/src/couchdb/couch_os_process.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_os_process.erl?rev=1036954&r1=1036953&r2=1036954&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_os_process.erl (original)
+++ couchdb/trunk/src/couchdb/couch_os_process.erl Fri Nov 19 17:23:40 2010
@@ -93,7 +93,7 @@ readjson(OsProc) when is_record(OsProc, 
         ?LOG_INFO("OS Process ~p Log :: ~s", [OsProc#os_proc.port, Msg]),
         readjson(OsProc);
     [<<"error">>, Id, Reason] ->
-        throw({couch_util:to_existing_atom(Id),Reason});
+        throw({error, {couch_util:to_existing_atom(Id),Reason}});
     [<<"fatal">>, Id, Reason] ->
         ?LOG_INFO("OS Process ~p Fatal Error :: ~s ~p",[OsProc#os_proc.port, Id, Reason]),
         throw({couch_util:to_existing_atom(Id),Reason});
@@ -149,8 +149,6 @@ handle_call({prompt, Data}, _From, OsPro
     catch
         throw:{error, OsError} ->
             {reply, OsError, OsProc};
-        throw:{fatal, OsError} ->
-            {stop, normal, OsError, OsProc};
         throw:OtherError ->
             {stop, normal, OtherError, OsProc}
     end.



Mime
View raw message