git.iko.soy/distributed-process
on master help sign in
make exit/kill exceptions show text that is easy to parse
commitd14992979d0dfaaff7b629bebe097241c252a377 authorTim Watson <tim@rabbitmq.com> dateWed 16 Jan 2013, 23:17 (14 years ago) parent588e202
1 file changed+3−2
distributed-process/src/Control/Distributed/Process/Internal/Primitives.hs+3−2
distributed-process/src/Control/Distributed/Process/Internal/Primitives.hs+3−2
@@ -362,7 +362,8 @@ data ProcessKillException =
362362
363363instance Exception ProcessKillException
364364instance Show ProcessKillException where
365− show (ProcessKillException pid reason) = "Kill by " ++ show pid ++ ": " ++ reason
365+ show (ProcessKillException pid reason) =
366+ "killed-by=" ++ show pid ++ ",reason=" ++ reason
366367
367368-- | Graceful request to exit a process
368369exit :: Serializable a => ProcessId -> a -> Process ()
@@ -379,7 +380,7 @@ data ProcessExitException =
379380
380381instance Exception ProcessExitException
381382instance Show ProcessExitException where
382− show (ProcessExitException pid _) = "Exit by " ++ show pid
383+ show (ProcessExitException pid _) = "exit-from=" ++ show pid
383384
384385-- | Catches ProcessExitException
385386catchExit :: forall a b . (Show a, Serializable a) => Process b -> (ProcessId -> a -> Process b) -> Process b