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
  • 57,703
  • 61
  • 205
  • 388

1 Answers1

2

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

RolandXu
  • 3,566
  • 2
  • 17
  • 23
  • 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