Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为 Linux 编写 C++ 代码。我将所有资源都包装在 RAII 对象中。
如果我的软件抛出异常并且任何地方都没有 try/catch 块。会发生什么?
我主要是在安全方面询问,因为这是我感兴趣的。如果资源丢失,那也很糟糕,特别是如果这也可能导致安全问题。
我故意很宽泛,不想给出生成此类覆盖率问题的代码的具体示例,因为即使有一个案例表明这是不好的做法,我将不得不修复我的代码。