diff options
Diffstat (limited to 'src/Network.hs')
| -rw-r--r-- | src/Network.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Network.hs b/src/Network.hs index b48a233..a06dc9b 100644 --- a/src/Network.hs +++ b/src/Network.hs @@ -29,6 +29,8 @@ import Network.Ip import Script.Expr import Script.Expr.Class +import Error + {- NETWORK STRUCTURE ================= @@ -193,7 +195,7 @@ newNode nodeNetwork vname = atomicallyWithIO $ do postpone $ do exists <- doesPathExist nodeDir - when exists $ ioError $ userError $ nodeDir ++ " exists" + when exists $ throwOtherError $ "node directory ‘" <> T.pack nodeDir <> "’ already exists" createDirectoryIfMissing True nodeDir let node = Node {..} |