internal CVException(CvErrorContext context) : base(context._errMsg) { base.Data.Add("User Data", context._userData); base.Data.Add("Status", context._status); base.Source = string.Format("filename: {0} (line: {1})", context._fileName, context._line); }
internal static void CheckLastError() { if (_errorContext != null) { CVException cve = new CVException(_errorContext); _errorContext = null; throw cve; } }
internal static void CheckLastError() { if (_errorContext != null) { CVException cve = new CVException(_errorContext); _errorContext = null; throw cve; } }
static int ErrorHandler( int status, [MarshalAs(UnmanagedType.LPStr)]string func_name, [MarshalAs(UnmanagedType.LPStr)]string err_msg, [MarshalAs(UnmanagedType.LPStr)]string file_name, int line, [MarshalAs(UnmanagedType.LPStr)]string userdata) { _errorContext = new CvErrorContext(err_msg, line, file_name, status, userdata); return 0; // if this value is non-zero the program is terminated }
static int ErrorHandler( int status, [MarshalAs(UnmanagedType.LPStr)] string func_name, [MarshalAs(UnmanagedType.LPStr)] string err_msg, [MarshalAs(UnmanagedType.LPStr)] string file_name, int line, [MarshalAs(UnmanagedType.LPStr)] string userdata) { _errorContext = new CvErrorContext(err_msg, line, file_name, status, userdata); return(0); // if this value is non-zero the program is terminated }
internal CVException(CvErrorContext context) : base(context._errMsg) { base.Data.Add("User Data", context._userData); base.Data.Add("Status", context._status); base.Source = string.Format("filename: {0} (line: {1})", context._fileName, context._line); }