mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
27 lines
647 B
Swift
27 lines
647 B
Swift
import Foundation
|
|
|
|
import CommonCorePublic
|
|
import LayoutKit
|
|
|
|
public protocol DivBlockModeling {
|
|
func makeBlock(context: DivBlockModelingContext) throws -> Block
|
|
}
|
|
|
|
public struct DivBlockModelingError: Error, CustomStringConvertible, Equatable {
|
|
public let description: String
|
|
|
|
init(_ message: String, path: UIElementPath) {
|
|
description = "\(message) [\(path)]"
|
|
DivKitLogger.error(description)
|
|
}
|
|
}
|
|
|
|
public struct DivBlockModelingWarning: CustomStringConvertible {
|
|
public let description: String
|
|
|
|
init(_ message: String, path: UIElementPath) {
|
|
description = "\(message) [\(path)]"
|
|
DivKitLogger.warning(description)
|
|
}
|
|
}
|