#include<bits/stdc++.h>
using namespace std;
int main()
{
int x = -1;
try{
cout<<"Insider try\n";
if(x<0){
throw x;
cout<<"After throw \n";
}
}
catch(int x){
cout<<"Exception caught\n";
}
cout<<"After caught";
return 0;
}
Comments
Post a Comment