introduction

Zero-overhead is not zero cost, Hutter proposal one determintic-exception, but Bjarne Stroutrup is negative about it.

The origins of exception handling lie in the problems experienced managing a variety of error-handling approaches, such as C’s errno, error-states, callbacks, return codes, and return objects. In addition, it was observed that there were no really good approaches to reporting errors detected in constructors and in operators.

overview

  1. SjLj(setjump-longjump) It is simpler to implement but has more runtime overhead, and now is deprecated in modern compiler.
  2. table-based (zero-overhead)
    • .eh_frame
    • .gcc_except_table

reference