本文整理汇总了C++中RaiseException函数的典型用法代码示例。如果您正苦于以下问题:C++ RaiseException函数的具体用法?C++ RaiseException怎么用?C++ RaiseException使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RaiseException函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: newAV
AV *NewArray(PERL_CALL_SINGLE)
{
AV *array = newAV();
if(!array)
RaiseException(STATUS_NO_MEMORY, 0, 0, NULL);
return array;
}
示例2: _set_invalid_parameter_handler_callback
//---------------------------------------------------------------------------------------
void _set_invalid_parameter_handler_callback( PCTSTR expression, PCTSTR function,
PCTSTR file, unsigned int line,
uintptr_t pReserved )
{
printf ( "_set_invalid_parameter_handler_callback \n" );
RaiseException(EXCEPTION_ACCESS_VIOLATION, 0, 0, NULL);
exit(0);
}
示例3: RaiseException
SV *NewReference(PERL_CALL SV *refObj)
{
SV *reference = NULL;
if(!refObj || !(reference = newRV(refObj)))
RaiseException(STATUS_NO_MEMORY, 0, 0, NULL);
return reference;
}
示例4: STGMEDIUM_UserUnmarshal
unsigned char * __RPC_USER STGMEDIUM_UserUnmarshal(unsigned long *pFlags, unsigned char *pBuffer, STGMEDIUM *pStgMedium)
{
DWORD content;
DWORD releaseunk;
ALIGN_POINTER(pBuffer, 3);
TRACE("("); dump_user_flags(pFlags); TRACE(", %p, %p\n", pBuffer, pStgMedium);
pStgMedium->tymed = *(DWORD *)pBuffer;
pBuffer += sizeof(DWORD);
if (pStgMedium->tymed != TYMED_NULL)
{
content = *(DWORD *)pBuffer;
pBuffer += sizeof(DWORD);
}
releaseunk = *(DWORD *)pBuffer;
pBuffer += sizeof(DWORD);
switch (pStgMedium->tymed)
{
case TYMED_NULL:
TRACE("TYMED_NULL\n");
break;
case TYMED_HGLOBAL:
TRACE("TYMED_HGLOBAL\n");
pBuffer = HGLOBAL_UserUnmarshal(pFlags, pBuffer, &pStgMedium->u.hGlobal);
break;
case TYMED_FILE:
FIXME("TYMED_FILE\n");
break;
case TYMED_ISTREAM:
FIXME("TYMED_ISTREAM\n");
break;
case TYMED_ISTORAGE:
FIXME("TYMED_ISTORAGE\n");
break;
case TYMED_GDI:
FIXME("TYMED_GDI\n");
break;
case TYMED_MFPICT:
FIXME("TYMED_MFPICT\n");
break;
case TYMED_ENHMF:
TRACE("TYMED_ENHMF\n");
pBuffer = HENHMETAFILE_UserUnmarshal(pFlags, pBuffer, &pStgMedium->u.hEnhMetaFile);
break;
default:
RaiseException(DV_E_TYMED, 0, 0, NULL);
}
pStgMedium->pUnkForRelease = NULL;
if (releaseunk)
FIXME("unmarshal pUnkForRelease\n");
return pBuffer;
}
示例5: _CxxThrowException
/*********************************************************************
* _CxxThrowException ([email protected])
*/
void WINAPI _CxxThrowException( exception *object, const cxx_exception_type *type )
{
ULONG_PTR args[3];
args[0] = CXX_FRAME_MAGIC_VC6;
args[1] = (ULONG_PTR)object;
args[2] = (ULONG_PTR)type;
RaiseException( CXX_EXCEPTION, EH_NONCONTINUABLE, 3, args );
}
示例6: pony_throw
void pony_throw()
{
//Continuable exception with no arguments. RaiseException involves a kernel
//mode transition.
RaiseException(PONY_EXCEPTION_CLASS, 0, 0, NULL);
//Never reaches here, since exceptions are always handled.
abort();
}
示例7: vbcurl_multi_fdset
CURLMcode __stdcall vbcurl_multi_fdset(MULTI_CONTEXT* pmc)
{
CURLMcode cl;
if (pmc->_magic != MULTI_MAGIC)
RaiseException(0xE0000000, EXCEPTION_NONCONTINUABLE, 0, NULL);
cl = curl_multi_fdset(pmc->_multi, &pmc->_readSet,
&pmc->_writeSet, &pmc->_excSet, &pmc->_maxFD);
return cl;
}
示例8: is_xpoint_break
static BOOL is_xpoint_break(int bpnum)
{
int type = dbg_curr_process->bp[bpnum].xpoint_type;
if (type == be_xpoint_break || type == be_xpoint_watch_exec) return TRUE;
if (type == be_xpoint_watch_read || type == be_xpoint_watch_write) return FALSE;
RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL);
return FALSE; /* never reached */
}
示例9: vbcurl_multi_perform
CURLMcode __stdcall vbcurl_multi_perform(MULTI_CONTEXT* pmc,
int* runningHandles)
{
CURLMcode cl;
if (pmc->_magic != MULTI_MAGIC)
RaiseException(0xE0000000, EXCEPTION_NONCONTINUABLE, 0, NULL);
cl = curl_multi_perform(pmc->_multi, runningHandles);
return cl;
}
示例10: gl_msvc_invalid_parameter_handler
static void __cdecl
gl_msvc_invalid_parameter_handler (const wchar_t *expression,
const wchar_t *function,
const wchar_t *file,
unsigned int line,
uintptr_t dummy)
{
RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL);
}
示例11: vbcurl_multi_cleanup
CURLMcode __stdcall vbcurl_multi_cleanup(MULTI_CONTEXT* pmc)
{
CURLMcode ret;
if (pmc->_magic != MULTI_MAGIC)
RaiseException(0xE0000000, EXCEPTION_NONCONTINUABLE, 0, NULL);
ret = curl_multi_cleanup(pmc->_multi);
free(pmc);
return ret;
}
示例12: newHV
HV *NewHash(PERL_CALL_SINGLE)
{
HV *hash = newHV();
if(!hash)
RaiseException(STATUS_NO_MEMORY, 0, 0, NULL);
return hash;
}
示例13: HENHMETAFILE_UserUnmarshal
unsigned char * __RPC_USER HENHMETAFILE_UserUnmarshal(unsigned long *pFlags, unsigned char *pBuffer, HENHMETAFILE *phEmf)
{
ULONG fContext;
TRACE("("); dump_user_flags(pFlags); TRACE(", %p, %p\n", pBuffer, phEmf);
fContext = *(ULONG *)pBuffer;
pBuffer += sizeof(ULONG);
if (((fContext == WDT_INPROC_CALL) && (sizeof(*phEmf) < 8)) ||
((fContext == WDT_INPROC64_CALL) && (sizeof(*phEmf) == 8)))
{
*phEmf = *(HENHMETAFILE *)pBuffer;
pBuffer += sizeof(*phEmf);
}
else if (fContext == WDT_REMOTE_CALL)
{
ULONG handle;
handle = *(ULONG *)pBuffer;
pBuffer += sizeof(ULONG);
if (handle)
{
ULONG size;
size = *(ULONG *)pBuffer;
pBuffer += sizeof(ULONG);
if (size != *(ULONG *)pBuffer)
{
RaiseException(RPC_X_BAD_STUB_DATA, 0, 0, NULL);
return pBuffer;
}
pBuffer += sizeof(ULONG);
*phEmf = SetEnhMetaFileBits(size, pBuffer);
pBuffer += size;
}
else
*phEmf = NULL;
}
else
RaiseException(RPC_S_INVALID_TAG, 0, 0, NULL);
return pBuffer;
}
示例14: _GetBufferFromByteArray
// 从CByteArray获取数据块
void* _GetBufferFromByteArray(BYTE* pSource, long &lPtr, void* pBuf, long lLen, long bufSize)
{
if( bufSize != -1 && bufSize < lPtr+lLen )
RaiseException(0x1000A, EXCEPTION_NONCONTINUABLE, 0, 0);// 0x1000A buffer err
//copy
memcpy(pBuf,pSource+lPtr,lLen);
lPtr += lLen;
return pBuf;
}
示例15: ReportException
VOID ReportException (LPCTSTR UserMessage, DWORD ExcetionCode)
/* Сообщает, как о нефатальной ошибке */
{
ReportError(UserMessage, 0, TRUE);
/* Если ошибка фатальна, вызывает исключение */
if (ExcetionCode != 0)
RaiseException (
(0x0FFFFFFF & ExcetionCode) | 0xE0000000, 0, 0, NULL);
return;
}