pengecualian khusus CPP

int main()
{
   int err = -99;
   cout << "Before try \n";
   try {
      cout << "Inside try \n";
      if (err < 0)
      {
         throw err;
         cout << "After throw (Never executed) \n";
      }
   }
   catch (int err ) {
      cout << "Exception Occured! \n";
   }
 
   cout << "After catch (Will be executed) \n";
   return 0;
}
Pranjal Pratap Singh