exceptions.cpp

来自「tracciatore di mani con webcam」· C++ 代码 · 共 42 行

CPP
42
字号
#include "Common.h"#include "Exceptions.h"#include <ostream>HVException::HVException(string msg){  m_msg = msg;}string HVException::GetMessage() const{  printf("%s\n", m_msg.c_str());  return m_msg;}ostream& HVException::output(ostream& os) const{  return os << m_msg;}ostream& operator<<(ostream& os, const HVException& ite) {  return ite.output(os);}HVEFile::HVEFile(string filename, string msg)  : HVException("error with file "+filename+":\n"+msg),    m_filename(filename){}HVEFileNotFound::HVEFileNotFound(string filename)  : HVEFile(filename, "could not find or open file"){}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?