what is the use of exceptional handing in c++

1. what are the exception can occur while writing a application programme in C++?
2. if we throw exception our self by error checking with if and else statement then what is the use of using exceptional handing (try and catch) block.

thanking in advance!

regards,
Bikash Kanodia
1) Did you mean while executing? The standard exceptions are logic_error, invalid_argument, domain_error, length_error, out_of_range, runtime_error, range_error, overflow_error, underflow_error, bad_typeid, bad_cast, bad_weak_ptr, bad_function_call, bad_alloc, bad_array_new_length, bad_exception, system_error, ios_base::failure, future_error

2) It lets you separate error reporting from error handling.
thank u Cubbi and Bartoli
Topic archived. No new replies allowed.