0

Possible Duplicate:
How do exceptions work (behind the scenes) in c++

I know that the try/catch blocks can add a little overhead during the runtime. But is it the case for a single "throw" instruction with no try/catch blocks ?

Thank you very much.

Community
  • 1
  • 1
Vincent
  • 53,995
  • 57
  • 182
  • 359

1 Answers1

2

if the throw without try/cache, then the throw is meaningless and cause the application crash.

RolandXu
  • 3,376
  • 2
  • 14
  • 22
  • It isn't meaningless; it provides the coder with a clear description of why the program's execution stopped, assuming the coder uses something that prints it. It's always possible to go out of bounds of an array etc. by mistake. – chris Jun 04 '12 at 01:20