Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Aydın Akbulut
Added: Jan 12, 2020 12:59 AM
Modified: Jan 12, 2020 1:00 AM
Views: 9
Tags: no tags
  1. try {
  2.         //statements to try
  3.         } catch (e if test1) {
  4.                 //exception handling for the case that test1 is true
  5.         } catch (e if test2) {
  6.                 //exception handling for when test1 is false and test2 is true
  7.         } catch (e) {
  8.                 //exception handling for when both test1and test2 are false
  9.         } finally {
  10.                 // optional, as usual
  11.                 //   code that is always executed
  12.         }
  13.