gpt4 book ai didi

c++ - 如何捕获除使用 GDB 的异常类型之外的所有异常类型?

转载 作者:太空狗 更新时间:2023-10-29 11:40:32 24 4
gpt4 key购买 nike

我知道 _catch throw_ 甚至 _catch throw MyExceptionType_

我需要的是特定异常类型以外的所有内容。

最佳答案

由于 gdb 对异常字符串使用正则表达式,您可以使用 catch throw (?!MyExceptionType)(这将匹配除完全“MyExceptionType”之外的任何异常)

另见 Match everything except for specified strings

关于c++ - 如何捕获除使用 GDB 的异常类型之外的所有异常类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54131251/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com