Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift Handling Errors Using do-catch Statement

do {
  try division(numerator: 10, denominator: 0)
  ...
}

catch DivisionError.dividedByZero {
  // statement
}
Source by codewithchris.com #
 
PREVIOUS NEXT
Tagged: #Swift #Handling #Errors #Using #Statement
ADD COMMENT
Topic
Name
8+5 =