From 3c32a8e8fb3e09baebfb47bb31258e2e3b2128df Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Sat, 11 Jan 2014 17:23:51 -0800 Subject: [PATCH] Throw error when sending to terminated process Mirrors behavior of start method --- src/task.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/task.coffee b/src/task.coffee index de8d3de10..80eaa81b8 100644 --- a/src/task.coffee +++ b/src/task.coffee @@ -91,6 +91,7 @@ class Task # * message: # The message to send send: (message) -> + throw new Error("Cannot send message to terminated process") unless @childProcess? @childProcess.send(message) # Public: Forcefully stop the running task.