Catch error when contents method raises exception

This commit fixes exception when calling contents method is not allowed for security reasons.

![contents error](https://f.cloud.github.com/assets/5878206/1832774/1e183d80-73bd-11e3-9220-da497c8e6b64.png)

![chrome error](https://f.cloud.github.com/assets/5878206/1832794/89a26c2e-73bd-11e3-9722-c9376b66b00f.png)