diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-08 14:14:08 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-08 14:14:08 -0400 |
commit | 9fd8e06d35f384b6d24cf6c8a976e2af79be177d (patch) | |
tree | 234ab7eef51e34fbade8585635798c5cb0b85c1b | |
parent | 0d5734f51759bf3d9c3a5fe34591d6139f479187 (diff) |
include error message when unable to connect to peer
-rw-r--r-- | Command/P2P.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/P2P.hs b/Command/P2P.hs index 21632f3da..db69eff97 100644 --- a/Command/P2P.hs +++ b/Command/P2P.hs @@ -81,7 +81,7 @@ linkRemote remotename = do setup (P2PAddressAuth addr authtoken) = do g <- Annex.gitRepo conn <- liftIO $ connectPeer g addr - `catchNonAsync` giveup "Unable to connect with peer. Please check that the peer is connected to the network, and try again." + `catchNonAsync` connerror u <- getUUID v <- liftIO $ runNetProto conn $ P2P.auth u authtoken case v of @@ -96,3 +96,4 @@ linkRemote remotename = do storeP2PRemoteAuthToken addr authtoken return ok _ -> giveup "Unable to authenticate with peer. Please check the address and try again." + connerror e = giveup $ "Unable to connect with peer. Please check that the peer is connected to the network, and try again. (" ++ show e ++ ")" |