📄 bcamexception.cpp
字号:
//-----------------------------------------------------------------------------
// Company: Basler Vision Technologies
// Section: Vision Components
// Project: 1394 Driver
// $Header: BcamException.cpp, 7, 25.09.2003 12:41:41, Nebelung, H.$
//-----------------------------------------------------------------------------
/**
\file BcamException.cpp
\brief Implemention of class BcamException
*/
#include "stdafx.h"
#include "BcamError.h"
#include "BcamException.h"
using Bvc::ErrorNumber;
using Bvc::Exception;
using namespace Bcam;
const CString BcamException::m_LibraryFile = _T( "BcamError.dll" );
//------------------------------------------------------------------------------
// BcamException::BcamException( ErrorNumber e, CString context, va_list *pArgs): m_Error( e ), m_Description( "<no error message available>" ), m_Context( context )
// Author:
//------------------------------------------------------------------------------
/**
* \brief Constructs a new object.
*
* \param e The error code.
* \param context The context string, describing the circumstances of the exception.
* \param *pArgs Pointer to a list of arguments
*/
//------------------------------------------------------------------------------
BcamException::BcamException( ErrorNumber e, CString context, va_list *pArgs)
: Exception( e, context, true )
{
FormatMessage( m_LibraryFile, (char**)pArgs );
}
//------------------------------------------------------------------------------
// BcamException::BcamException( ErrorNumber e, CString context , PVOID pArg )
// Author: Hartmut Nebelung
//------------------------------------------------------------------------------
/**
* \overload
* \brief Constructs a new object
*
* \param e The error code.
* \param context The context string, describing the circumstances of the exception.
* \param lpArgs Pointer to a single argument
*/
//------------------------------------------------------------------------------
BcamException::BcamException( ErrorNumber e, CString context , PVOID pArg )
: Exception( e, context, true )
{
FormatMessage( m_LibraryFile, (char**) pArg );
};
//------------------------------------------------------------------------------
// void BcamException::FormatMessage( const CString& LibraryFile, char** ppArgs )
// Author:
// Date: 05.09.2002
//------------------------------------------------------------------------------
/**
* <type function description here>
*
* \param LibraryFile
* \param ppArgs
* \return
*
* <type Return description here>
*
* \see <delete line if not used>
* \todo
*/
//------------------------------------------------------------------------------
void BcamException::FormatMessage( const CString& LibraryFile, char** ppArgs )
{
const WORD facility = WORD( HIWORD( m_Error ) & 0xfff );
if (facility == FACILITY_BCAM_DRIVER_ERROR)
{ // Clear custom code flag
m_Error &= 0xdfffffff;
}
Exception::FormatMessage( LibraryFile, ppArgs );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -