     /// The current size of the layout node's contents
     // TODO: currently this is only used by UIScrollView - should it be public?
     public var contentSize: CGSize {
-        return attempt { try inferContentSize() } ?? .zero
+        return attempt(inferContentSize) ?? .zero
     }
 
     // AutoLayout support

    private func inferContentSize() throws -> CGSize {
        // Check for explicit size
        if expressions["contentSize"] != nil, !_evaluating.contains("contentSize") {
            return attempt { try value(forSymbol: "contentSize") as? CGSize ?? .zero } ?? .zero
        }
        // Try best fit for subviews
        var size = CGSize.zero

        }
    }

    private func attempt<T>(_ closure: () throws -> T) -> T? {
        do {
            return try closure()
        } catch {
            let error = LayoutError(error, for: self)
            if _unhandledError == nil || (_unhandledError?.isTransient == true && !error.isTransient) {
                _unhandledError = error
                // Don't bubble if we're in the middle of evaluating an expression
                if _evaluating.isEmpty {
                    bubbleUnhandledError()
                }
            }
            return nil
        }
    }
