Treat port attachment failures correctly

Raise a more appropriate exception following the failure of a
port attachment.

Closes-bug: #1245683

Change-Id: I77e9568c8675b0dd6a0c8c741e71e936ed3998a1
Merge "Treat port attachment failures correctly"