mirror of https://github.com/cirruslabs/tart.git
Better message if hardware model is not supported by the host (#962)
Related to https://github.com/cirruslabs/tart/discussions/961 It seems `VZMacHardwareModel #init?(dataRepresentation: Data)` is nullable sometimes. Let's return a better message in this case.
This commit is contained in:
parent
2db3918930
commit
c825ba4cb1
|
|
@ -38,7 +38,7 @@ struct UnsupportedHostOSError: Error, CustomStringConvertible {
|
|||
throw DecodingError.dataCorruptedError(forKey: .hardwareModel, in: container, debugDescription: "")
|
||||
}
|
||||
guard let hardwareModel = VZMacHardwareModel.init(dataRepresentation: data) else {
|
||||
throw DecodingError.dataCorruptedError(forKey: .hardwareModel, in: container, debugDescription: "")
|
||||
throw UnsupportedHostOSError()
|
||||
}
|
||||
self.hardwareModel = hardwareModel
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue