出现这种错误的原因就是没有处理错误
解决方法,在报错的方法外加上try catch,即 do{ try ..} catch {}
如下
do {
try print("")
} catch {
print("")
return NSAttributedString()
}
出现这种错误的原因就是没有处理错误
解决方法,在报错的方法外加上try catch,即 do{ try ..} catch {}
如下
do {
try print("")
} catch {
print("")
return NSAttributedString()
}
本文标题:Swift Call can throw, but it is
本文链接:https://www.haomeiwen.com/subject/qvssiltx.html
网友评论