Returns the value produced by the block parameter as a Result. If an exception is thrown within the block that matches the type declared on the Result, then that exception is returned as the result. All other exceptions will be rethrown.