0

ANSWER TO SUGGESTION:

I'm using 3rd party classes from CGMathParser that throw exceptions whenever the user types invalid strings. I don't think the solution mentioned in your link can help me. Or maybe yes, but I can't figure out how

As the title suggest I need @try equivalent in Swift for this purpose:

Obj-C:

@try {
  //Some code
}
@catch (NSException* error) {
  //Catch exception if raised          
}

Swift ?

Thanks a lot.

Alberto
  • 4,212
  • 5
  • 22
  • 36
  • I'm using 3rd party classes from CGMathParser that throw exceptions whenever the user types invalid strings. I don't think the solution mentioned in your link can help me. Or maybe yes, but I can't figure out how – Alberto Jun 22 '14 at 20:41
  • Unfortunately there isn't any try/catch support in swift. It may come eventually – Connor Pearson Jun 22 '14 at 20:43

0 Answers0