Wrap some cases where exceptions can be thrown.
Merge branch 'wrap-exceptions' into playground