cplusplus
.com
教程
參考
文章
論壇
C++
教程
參考
文章
論壇
參考
C 庫
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
C++11
<cfenv> (fenv.h)
<cfloat> (float.h)
C++11
<cinttypes> (inttypes.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
C++11
<cstdbool> (stdbool.h)
<cstddef> (stddef.h)
C++11
<cstdint> (stdint.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
C++11
<ctgmath> (tgmath.h)
<ctime> (time.h)
C++11
<cuchar> (uchar.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
容器
C++11
<array>
<deque>
C++11
<forward_list>
<list>
<map>
<queue>
<set>
<stack>
C++11
<unordered_map>
C++11
<unordered_set>
<vector>
輸入/輸出
<fstream>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<ostream>
<sstream>
<streambuf>
多執行緒
C++11
<atomic>
C++11
<condition_variable>
C++11
<future>
C++11
<mutex>
C++11
<thread>
其他
<algorithm>
<bitset>
C++11
<chrono>
C++11
<codecvt>
<complex>
<exception>
<functional>
C++11
<initializer_list>
<iterator>
<limits>
<locale>
<memory>
<new>
<numeric>
C++11
<random>
C++11
<ratio>
C++11
<regex>
<stdexcept>
<string>
C++11
<system_error>
C++11
<tuple>
C++11
<type_traits>
C++11
<typeindex>
<typeinfo>
<utility>
<valarray>
<exception>
函式
C++11
current_exception
C++11
get_terminate
C++11
get_unexpected
C++11
make_exception_ptr
C++11
rethrow_exception
C++11
rethrow_if_nested
set_terminate
set_unexpected
terminate
C++11
throw_with_nested
uncaught_exception
unexpected
型別
bad_exception
exception
C++11
exception_ptr
C++11
nested_exception
terminate_handler
unexpected_handler
參考
<exception>
get_terminate
函式
<exception>
std::
get_terminate
terminate_handler get_terminate() noexcept;
獲取終止處理函式
獲取
終止處理函式
。
當找不到丟擲的異常的
catch
處理程式,或者由於其他無法繼續異常處理過程的異常情況時,會自動呼叫
終止處理函式
。
如果程式之前沒有透過呼叫
set_terminate
設定該函式,則該函式可能返回
空指標
(儘管某些實現也可能返回一個呼叫
abort
的有效函式指標)。
引數
無
返回值
如果程式先前已呼叫
set_terminate
,則該函式將返回當前的
終止處理函式
。
否則,它返回一個未指定的值(
空指標
或有效的函式指標)。
terminate_handler
是一個不接受任何引數且不返回任何值的函式指標型別。
資料競爭
呼叫此函式不會引入資料競爭,並且與呼叫
set_terminate
同步。
異常安全
無異常保證:
此函式從不丟擲異常。
另見
set_terminate
設定終止處理函式
(函式)
terminate
處理異常終止的函式
(函式)