nlexception.cpp
来自「一些unix下的c/c++的util包」· C++ 代码 · 共 21 行
CPP
21 行
#include "nlkit/NLException.h"
#include <ostream>
using namespace nlkit;
using namespace std;
void NLException::print(std::ostream& os) const
{
os << "throw " << name() << " ";
if(m_file && m_line > 0)
{
os << "from " << m_file << ':' << m_line << ": ";
}
}
ostream& operator<<(ostream& out, const NLException& ex)
{
ex.print(out);
return out;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?