Instead, you should try/catch the `navigator.mozTCPSocket.open(host, port);` call below.

```
< navigator.mozTCPSocket.open(host, port);
[Exception... "[JavaScript Error: "TCPSocket does not have permission in this context.
" {file: "file:///build/buildd/firefox-30.0~a2~hg20140414r185560/obj-x86_64-linux-gnu/dist/bin/components/TCPSocket.js" line: 510}]'[JavaScript Error: "TCPSocket does not have permission in this context.
" {file: "file:///build/buildd/firefox-30.0~a2~hg20140414r185560/obj-x86_64-linux-gnu/dist/bin/components/TCPSocket.js" line: 510}]' when calling method: [nsIDOMTCPSocket::open]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: debugger eval code :: <TOP_LEVEL> :: line 1"  data: yes]
```

Do check on other platforms than Linux though :)