Provide a note about our use of serialisation in `die'
commit6aa01c6d567e10b2a1a53b953d89691fc49b6828
authorTim Watson <tim@rabbitmq.com>
dateThu 9 May 2013, 21:35 (13 years ago)
parent10bdf67
src/Control/Distributed/Process/Internal/Primitives.hs+3
@@ -577,6 +577,9 @@ terminate = liftIO $ throwIO ProcessTerminationException
577577-- | Die immediately - throws a 'ProcessExitException' with the given @reason@.
578578die :: Serializable a => a -> Process b
579579die reason = do
580+-- NOTE: We do /not/ want to use UnencodedMessage here, as the exception
581+-- could be decoded by a handler passed to 'catchExit', re-thrown or even
582+-- passed to another process via the tracing mechanism.
580583 pid <- getSelfPid
581584 liftIO $ throwIO (ProcessExitException pid (createMessage reason))
582585