/// <summary>
        /// 初期化
        /// </summary>
        /// <param name="status">エラーステータス</param>
        /// <param name="funcName">エラーが発生した関数名</param>
        /// <param name="errMsg">エラーについての追加情報/診断結果</param>
        /// <param name="fileName">エラーが発生したファイル名</param>
        /// <param name="line">エラーが発生した行番号</param>
#else
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="status">The numeric code for error status</param>
        /// <param name="funcName">The source file name where error is encountered</param>
        /// <param name="errMsg">A description of the error</param>
        /// <param name="fileName">The source file name where error is encountered</param>
        /// <param name="line">The line number in the souce where error is encountered</param>
#endif
        public OpenCVException(CvStatus status, string funcName, string errMsg, string fileName, int line)
            : base(errMsg)
        {
            Status   = status;
            FuncName = funcName;
            ErrMsg   = errMsg;
            FileName = fileName;
            Line     = line;
        }
Exemple #2
0
        /// <summary>
        /// エラーステータスのコードのテキスト情報を返す
        /// </summary>
        /// <param name="status">エラーステータス</param>
        /// <returns>指定したエラーステータスコードのテキスト記述</returns>
#else
        /// <summary>
        /// Returns textual description of error status code
        /// </summary>
        /// <param name="status">The error status. </param>
        /// <returns>The textual description for the specified error status code.</returns>
#endif
        public static string ErrorStr(CvStatus status)
        {
            return CvInvoke.cvErrorStr(status);
        }
Exemple #3
0
        /// <summary>
        /// エラーを発生させる
        /// </summary>
        /// <param name="status">エラーステータス</param>
        /// <param name="func_name">エラーが発生した関数名</param>
        /// <param name="err_msg">エラーについての追加情報/診断結果</param>
        /// <param name="file_name">エラーが発生したファイル名</param>
        /// <param name="line">エラーが発生した行番号</param>
#else
        /// <summary>
        /// Raises an error
        /// </summary>
        /// <param name="status">The error status.</param>
        /// <param name="func_name">Name of the function where the error occurred. </param>
        /// <param name="err_msg">Additional information/diagnostics about the error. </param>
        /// <param name="file_name">Name of the file where the error occurred. </param>
        /// <param name="line">Line number, where the error occurred. </param>
#endif
        public static void Error(CvStatus status, string func_name, string err_msg, string file_name, int line)
        {
            if (string.IsNullOrEmpty(func_name))
                throw new ArgumentNullException("func_name");
            if (string.IsNullOrEmpty(err_msg))
                throw new ArgumentNullException("err_msg");
            if (string.IsNullOrEmpty(file_name))
                throw new ArgumentNullException("file_name");
            CvInvoke.cvError(status, func_name, err_msg, file_name, line);
        }
Exemple #4
0
        /// <summary>
        /// エラーステータスのコードのテキスト情報を返す
        /// </summary>
        /// <param name="status">エラーステータス</param>
        /// <returns>指定したエラーステータスコードのテキスト記述</returns>
#else
        /// <summary>
        /// Returns textual description of error status code
        /// </summary>
        /// <param name="status">The error status. </param>
        /// <returns>The textual description for the specified error status code.</returns>
#endif
        public static string ErrorStr(CvStatus status)
        {
            return NativeMethods.cvErrorStr(status);
        }
Exemple #5
0
        /// <summary>
        /// エラーを発生させる
        /// </summary>
        /// <param name="status">エラーステータス</param>
        /// <param name="funcName">エラーが発生した関数名</param>
        /// <param name="errMsg">エラーについての追加情報/診断結果</param>
        /// <param name="fileName">エラーが発生したファイル名</param>
        /// <param name="line">エラーが発生した行番号</param>
#else
        /// <summary>
        /// Raises an error
        /// </summary>
        /// <param name="status">The error status.</param>
        /// <param name="funcName">Name of the function where the error occurred. </param>
        /// <param name="errMsg">Additional information/diagnostics about the error. </param>
        /// <param name="fileName">Name of the file where the error occurred. </param>
        /// <param name="line">Line number, where the error occurred. </param>
#endif
        public static void Error(CvStatus status, string funcName, string errMsg, string fileName, int line)
        {
            if (string.IsNullOrEmpty(funcName))
                throw new ArgumentNullException("funcName");
            if (string.IsNullOrEmpty(errMsg))
                throw new ArgumentNullException("errMsg");
            if (string.IsNullOrEmpty(fileName))
                throw new ArgumentNullException("fileName");
            NativeMethods.cvError(status, funcName, errMsg, fileName, line);
        }
        /// <summary>
        /// 初期化
        /// </summary>
        /// <param name="status">エラーステータス</param>
        /// <param name="funcName">エラーが発生した関数名</param>
        /// <param name="errMsg">エラーについての追加情報/診断結果</param>
        /// <param name="fileName">エラーが発生したファイル名</param>
        /// <param name="line">エラーが発生した行番号</param>
#else
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="status">The numeric code for error status</param>
        /// <param name="funcName">The source file name where error is encountered</param>
        /// <param name="errMsg">A description of the error</param>
        /// <param name="fileName">The source file name where error is encountered</param>
        /// <param name="line">The line number in the souce where error is encountered</param>
#endif
        public OpenCVException(CvStatus status, string funcName, string errMsg, string fileName, int line)
            : base(errMsg)
        {
            Status = status;
            FuncName = funcName;
            ErrMsg = errMsg;
            FileName = fileName;
            Line = line;
        }