Fixes at_exit inheritance issue. Rescue and pass any exception except SignalException to on_error.