You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.`TryExcept` and `TryContext` now support handling exceptions based on exception message strings and have added the functionality to negate exception types.
2.Both `@Retry` and `@Retry()` are now supported as valid syntax, as well as `TryExcept`.
3.Fixed an issue: The retry counter in `Retry` incorrectly started from zero. gqylpy#4
4.Fixed an issue: The `stacklevel` positioning of the logger object was sometimes inaccurate. gqylpy#5
5.Optimized exception output for `Retry`, adding display for `limit_time` and `event`.
6.Fixed a serious issue in `Retry` where exception information might be "spammed" output.
7.Added type checking for the parameter `etype`.
8.The internal default value for retry events has been changed to `None`.
9.Updated annotations, comments, and documentation files for the above changes.
1.`TryExcept` 和 `TryContext` 现在支持按异常消息字符串处理异常,并新增了异常类型取反的功能。
2.同时支持 `@Retry` 和 `@Retry()` 作为有效语法,亦 `TryExcept`。
3.修复问题:`Retry` 中重试计数器错误地从零开始。 gqylpy#4
4.修复问题:日志记录器对象 `stacklevel` 定位有时不准确。 gqylpy#5
5.优化了 `Retry` 的异常输出,增加了对 `limit_time` 和 `event` 显示。
6.修复了 `Retry` 中可能会 “疯狂输出” 异常信息的严重问题。
7.添加对参数 `etype` 的类型校验。
8.重试事件的内部默认值修改为 `None`。
9.针对以上改动更新注解,注释及自述文件。
示例代码:
输出如下:
The text was updated successfully, but these errors were encountered: