Add withDefaultOnIOError
Add withDefaultOnIOError

This is a specialized version of try with a constant
handler. The main benefit is the type annotation forcing
the free type variable in 'try' to be IOError.

Signed-off-by: Klaus Aehlig <4ce51de36d9068cd7db2eec1151e0f3f95419008@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

Cherry-picked from 275519549e22411ce33b52100c7685a18e94a26c

Signed-off-by: Klaus Aehlig <4ce51de36d9068cd7db2eec1151e0f3f95419008@google.com>
Reviewed-by: Petr Pudlak <9d19625f8ee825a2c398462ed335cbcf98f79c32@google.com>

yiannist/ganeti,grnet/snf-ganeti,leshchevds/ganeti,andir/ganeti,grnet/snf-ganeti,leshchevds/ganeti,onponomarev/ganeti,onponomarev/ganeti,bitemyapp/ganeti,mbakke/ganeti,bitemyapp/ganeti,ganeti/ganeti,apyrgio/ganeti,dimara/ganeti,ganeti/ganeti,ganeti/ganeti,andir/ganeti,dimara/ganeti,leshchevds/ganeti,mbakke/ganeti,apyrgio/ganeti,yiannist/ganeti,mbakke/ganeti,andir/ganeti,yiannist/ganeti