swift2 - expected identifier in function declaration swift -


when upgrade swift 1.2 swift 2.0 following error occurs

expected identifier in function declaration swift

here code

internal func try(block: () -> int32) {     perform { if block() != sqlite_ok { assertionfailure("\(self.lasterror!)") } } } 

can how solve this

try keyword in swift 2.0 do ... try ... catch ... statement, should change name of function, instance:

internal func mytry(block: () -> int32) {     perform { if block() != sqlite_ok { assertionfailure("\(self.lasterror!)") } } } 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -