As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center提供指导。




9年前关闭。




很久以前,我读了Herb Sutter的一篇文章(可能),该文章介绍了一种良好/安全的方法,能够在抛出异常时流式传输到异常。它可能已经出现在Dobbs博士杂志上。

即像这样:
throw MyException() << "And this is my error message";

有人记得这篇文章并且也有链接吗?

编辑

其实这篇文章是由Gigi Sayfan写的

最佳答案

Practical C++ Error Handling in Hybrid Environments

关于c++ - 流异常文章,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8301291/

10-13 03:41