8.4.1. MDOException

class MDOException

Mindopt的异常类,用以标识系统中发生的错误。

方法

MDOException

用错误码构造错误

MDOException

使用错误消息和错误码构造错误

getErrorCode

检索错误码

getMessage

检索错误消息

MDOException(int errcode = 0)

用错误码构造错误

Parameters

int errcode=0 – 错误码

MDOException(std::string errmsg, int errcode = 0)

使用错误消息和错误码构造错误

Parameters
  • std::string errmsg – 错误消息

  • int errcode=0 – 错误码

int getErrorCode()

检索错误码

Returns

错误码

const std::string getMessage()

检索错误消息

Returns

错误消息