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
Post a Comment