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

xml - Extract substrings with XSLT -

math - "ELO Rating" and how does "TSR Rating" work? -

How can do a tuple comparison in coffeescript similar to that in python? -