Catch SSL errors in example

Change-Id: Ib9a399789878030361d9bdddd8dbfbb1832cf756
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Remove superfluous setProtocol call

Change-Id: I14f16bbe0a68602265a28d71464727b671be5099
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>