title: How to stop crashing in swift3 using try catch
body: <p>In objective c we use try catch to stop crashing e.g.</p>
  
  <pre><code>- (void)viewDidLoad {
  [super viewDidLoad];
  
  tableData = [NSArray arrayWithObjects:@"Egg Benedict", @"Mushroom Risotto", @"Full Breakfast", @"Hamburger", @"Ham and Egg Sandwich", @"Creme Brelee", @"White Chocolate Donut", @"Starbucks Coffee", @"Vegetable Curry", @"Instant Noodle with Egg", @"Noodle with BBQ Pork", @"Japanese Noodle with Pork", @"Green Tea", @"Thai Shrimp Cake", @"Angry Birds Cake", @"Ham and Cheese Panini", nil];
  
  
  
  @try {
      NSLog(@"%@",tableData[1000]);
       } @catch (NSException *exception) {
      NSLog(@"%@",exception);
    }  
   }
  </code></pre>
  
  <p>But when I am using swift 3 , warning showing and application crashed</p>
  
  <p><a href="https://i.stack.imgur.com/rJ99z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rJ99z.png" alt="enter image description here"></a></p>
  
  <p>Can anyone explain, how can i stop this. I read some topics from google but couldn't  understand. Can any one help me out.</p>