In C++ if a functions or a nested try-blocks does not want to handle an exceptions, it can rethrow that exceptions to the functions or the outer try-block to handle that exceptions. Syntax for rethrowing and exceptions is as follow: throw; Following program demonstrate rethrowing and exceptions to outer try-catch block: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 #include<iostream> using namespace std; int main() { int ab, ba; cout<<“Enter
The post How to ReThrow an Exception in C++ Programming appeared first on Coding Security.
How to ReThrow an Exception in C++ Programming
read more
Tidak ada komentar:
Posting Komentar