標準庫標頭檔案 <cerrno>
來自 cppreference.com
此標頭檔案最初在 C 標準庫中為 <errno.h>。
此標頭檔案是錯誤處理庫的一部分。
目錄 |
[編輯] 宏
擴充套件為 POSIX 相容的執行緒區域性錯誤碼變數的宏 (宏變數) | |
E2BIG (C++11) |
引數列表過長 (宏常量) |
EACCES (C++11) |
許可權被拒絕 (宏常量) |
EADDRINUSE (C++11) |
地址已在使用 (宏常量) |
EADDRNOTAVAIL (C++11) |
地址不可用 (宏常量) |
EAFNOSUPPORT (C++11) |
地址族不受支援 (宏常量) |
EAGAIN (C++11) |
資源不可用,請重試 (宏常量) |
EALREADY (C++11) |
連線已在進行中 (宏常量) |
EBADF (C++11) |
錯誤的檔案描述符 (宏常量) |
EBADMSG (C++11) |
錯誤的訊息 (宏常量) |
EBUSY (C++11) |
裝置或資源忙 (宏常量) |
ECANCELED (C++11) |
操作已取消 (宏常量) |
ECHILD (C++11) |
無子程序 (宏常量) |
ECONNABORTED (C++11) |
連線中止 (宏常量) |
ECONNREFUSED (C++11) |
連線被拒絕 (宏常量) |
ECONNRESET (C++11) |
連線重置 (宏常量) |
EDEADLK (C++11) |
資源死鎖將發生 (宏常量) |
EDESTADDRREQ (C++11) |
需要目標地址 (宏常量) |
EDOM |
數學引數超出函式域 (宏常量) |
EEXIST (C++11) |
檔案已存在 (宏常量) |
EFAULT (C++11) |
錯誤的地址 (宏常量) |
EFBIG (C++11) |
檔案過大 (宏常量) |
EHOSTUNREACH (C++11) |
主機無法訪問 (宏常量) |
EIDRM (C++11) |
識別符號已移除 (宏常量) |
EILSEQ |
非法位元組序列 (宏常量) |
EINPROGRESS (C++11) |
操作正在進行中 (宏常量) |
EINTR (C++11) |
函式被中斷 (宏常量) |
EINVAL (C++11) |
無效引數 (宏常量) |
EIO (C++11) |
I/O 錯誤 (宏常量) |
EISCONN (C++11) |
套接字已連線 (宏常量) |
EISDIR (C++11) |
是一個目錄 (宏常量) |
ELOOP (C++11) |
符號連結層數過多 (宏常量) |
EMFILE (C++11) |
檔案描述符值過大 (宏常量) |
EMLINK (C++11) |
連結過多 (宏常量) |
EMSGSIZE (C++11) |
訊息過大 (宏常量) |
ENAMETOOLONG (C++11) |
檔名過長 (宏常量) |
ENETDOWN (C++11) |
網路已關閉 (宏常量) |
ENETRESET (C++11) |
連線被網路重置 (宏常量) |
ENETUNREACH (C++11) |
網路無法訪問 (宏常量) |
ENFILE (C++11) |
系統開啟的檔案過多 (宏常量) |
ENOBUFS (C++11) |
無可用緩衝區空間 (宏常量) |
ENODATA (C++11) (在 C++23 中已棄用) |
STREAM 頭讀取佇列中無可用訊息 (宏常量) |
ENODEV (C++11) |
無此裝置 (宏常量) |
ENOENT (C++11) |
無此檔案或目錄 (宏常量) |
ENOEXEC (C++11) |
可執行檔案格式錯誤 (宏常量) |
ENOLCK (C++11) |
無可用鎖 (宏常量) |
ENOLINK (C++11) |
連結已斷開 (宏常量) |
ENOMEM (C++11) |
空間不足 (宏常量) |
ENOMSG (C++11) |
無所需型別的訊息 (宏常量) |
ENOPROTOOPT (C++11) |
協議不可用 (宏常量) |
ENOSPC (C++11) |
裝置上無剩餘空間 (宏常量) |
ENOSR (C++11) (在 C++23 中已棄用) |
無 STREAM 資源 (宏常量) |
ENOSTR (C++11) (在 C++23 中已棄用) |
不是 STREAM (宏常量) |
ENOSYS (C++11) |
函式不支援 (宏常量) |
ENOTCONN (C++11) |
套接字未連線 (宏常量) |
ENOTDIR (C++11) |
不是目錄 (宏常量) |
ENOTEMPTY (C++11) |
目錄不為空 (宏常量) |
ENOTRECOVERABLE (C++11) |
狀態不可恢復 (宏常量) |
ENOTSOCK (C++11) |
不是套接字 (宏常量) |
ENOTSUP (C++11) |
不支援 (宏常量) |
ENOTTY (C++11) |
不適當的 I/O 控制操作 (宏常量) |
ENXIO (C++11) |
無此裝置或地址 (宏常量) |
EOPNOTSUPP (C++11) |
套接字上不支援此操作 (宏常量) |
EOVERFLOW (C++11) |
值過大,無法儲存在資料型別中 (宏常量) |
EOWNERDEAD (C++11) |
前一個所有者已死亡 (宏常量) |
EPERM (C++11) |
操作不被允許 (宏常量) |
EPIPE (C++11) |
管道破裂 (宏常量) |
EPROTO (C++11) |
協議錯誤 (宏常量) |
EPROTONOSUPPORT (C++11) |
協議不支援 (宏常量) |
EPROTOTYPE (C++11) |
套接字協議型別錯誤 (宏常量) |
ERANGE |
結果過大 (宏常量) |
EROFS (C++11) |
只讀檔案系統 (宏常量) |
ESPIPE (C++11) |
無效的尋道 (宏常量) |
ESRCH (C++11) |
無此程序 (宏常量) |
ETIME (C++11) (在 C++23 中已棄用) |
流 ioctl() 超時(宏常量) |
ETIMEDOUT (C++11) |
連線超時 (宏常量) |
ETXTBSY (C++11) |
文字檔案忙 (宏常量) |
EWOULDBLOCK (C++11) |
操作將阻塞 (宏常量) |
EXDEV (C++11) |
跨裝置連結 (宏常量) |
[編輯] 注意
儘管標頭檔案 <cerrno>
基於 C 標準庫標頭檔案 <errno.h>,但 <cerrno>
定義的大多數宏是從 POSIX 標準而非 C 標準庫引入 C++ 的。
[編輯] 概要
#define errno /* see description */ #define E2BIG /* see description */ // freestanding #define EACCES /* see description */ // freestanding #define EADDRINUSE /* see description */ // freestanding #define EADDRNOTAVAIL /* see description */ // freestanding #define EAFNOSUPPORT /* see description */ // freestanding #define EAGAIN /* see description */ // freestanding #define EALREADY /* see description */ // freestanding #define EBADF /* see description */ // freestanding #define EBADMSG /* see description */ // freestanding #define EBUSY /* see description */ // freestanding #define ECANCELED /* see description */ // freestanding #define ECHILD /* see description */ // freestanding #define ECONNABORTED /* see description */ // freestanding #define ECONNREFUSED /* see description */ // freestanding #define ECONNRESET /* see description */ // freestanding #define EDEADLK /* see description */ // freestanding #define EDESTADDRREQ /* see description */ // freestanding #define EDOM /* see description */ // freestanding #define EEXIST /* see description */ // freestanding #define EFAULT /* see description */ // freestanding #define EFBIG /* see description */ // freestanding #define EHOSTUNREACH /* see description */ // freestanding #define EIDRM /* see description */ // freestanding #define EILSEQ /* see description */ // freestanding #define EINPROGRESS /* see description */ // freestanding #define EINTR /* see description */ // freestanding #define EINVAL /* see description */ // freestanding #define EIO /* see description */ // freestanding #define EISCONN /* see description */ // freestanding #define EISDIR /* see description */ // freestanding #define ELOOP /* see description */ // freestanding #define EMFILE /* see description */ // freestanding #define EMLINK /* see description */ // freestanding #define EMSGSIZE /* see description */ // freestanding #define ENAMETOOLONG /* see description */ // freestanding #define ENETDOWN /* see description */ // freestanding #define ENETRESET /* see description */ // freestanding #define ENETUNREACH /* see description */ // freestanding #define ENFILE /* see description */ // freestanding #define ENOBUFS /* see description */ // freestanding #define ENODEV /* see description */ // freestanding #define ENOENT /* see description */ // freestanding #define ENOEXEC /* see description */ // freestanding #define ENOLCK /* see description */ // freestanding #define ENOLINK /* see description */ // freestanding #define ENOMEM /* see description */ // freestanding #define ENOMSG /* see description */ // freestanding #define ENOPROTOOPT /* see description */ // freestanding #define ENOSPC /* see description */ // freestanding #define ENOSYS /* see description */ // freestanding #define ENOTCONN /* see description */ // freestanding #define ENOTDIR /* see description */ // freestanding #define ENOTEMPTY /* see description */ // freestanding #define ENOTRECOVERABLE /* see description */ // freestanding #define ENOTSOCK /* see description */ // freestanding #define ENOTSUP /* see description */ // freestanding #define ENOTTY /* see description */ // freestanding #define ENXIO /* see description */ // freestanding #define EOPNOTSUPP /* see description */ // freestanding #define EOVERFLOW /* see description */ // freestanding #define EOWNERDEAD /* see description */ // freestanding #define EPERM /* see description */ // freestanding #define EPIPE /* see description */ // freestanding #define EPROTO /* see description */ // freestanding #define EPROTONOSUPPORT /* see description */ // freestanding #define EPROTOTYPE /* see description */ // freestanding #define ERANGE /* see description */ // freestanding #define EROFS /* see description */ // freestanding #define ESPIPE /* see description */ // freestanding #define ESRCH /* see description */ // freestanding #define ETIMEDOUT /* see description */ // freestanding #define ETXTBSY /* see description */ // freestanding #define EWOULDBLOCK /* see description */ // freestanding #define EXDEV /* see description */ // freestanding
[編輯] 缺陷報告
下列更改行為的缺陷報告追溯地應用於以前出版的 C++ 標準。
缺陷報告 | 應用於 | 釋出時的行為 | 正確的行為 |
---|---|---|---|
LWG 288 | C++98 | 宏 EILSEQ 未在 <cerrno> 中定義 |
已定義 |