How I can wrap in do
catch
overflow error
let increasePerSecond: UInt32 = UInt32.max
let offset: UInt32
do {
offset = try ((nowTimeInterval - calculatedTimeInterval) * increasePerInterval)
} catch _ {
offset = 0
}
But if I have error in do
section I do not get in catch
and have crash my app
UPD: It's not about how to get var offset, the question is how to handle the error ?