来源信息
- 仓库
- google/boringssl
- 最近来源活动
- 2026年10月20日 15:18
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 2,290
- Forks
- 913
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- add-error-code
- description
- How to add a new error code in BoringSSL.
# Adding a New Error Code
To add a new error code, you only need to use it in the source code and then run the error generation script. The script will automatically define it in the header and update the error database.
## Steps
1. **Use the Error Code**:
* Use the new error code directly in your C/C++ source file (e.g., `EVP_R_NEW_ERROR_CODE`). It must start with the correct library prefix (e.g., `EVP_R_`, `SSL_R_`).
2. **Run the Error Generator**:
* Run [util/make_errors.go](../../../util/make_errors.go), passing the lowercase library name (e.g., `evp`, `ssl`).
* Example:
```bash
go run util/make_errors.go evp
```
* The script will automatically:
* Find the new error code in the source.
* Assign it a numeric value.
* Add the `#define` to the appropriate header in [include/openssl](../../../include/openssl).
* Update the `.errordata` file in [crypto/err](../../../crypto/err).
在 GitHub 查看