本文整理汇总了C++中VJSParms_callStaticFunction::GetExceptionRefPointer方法的典型用法代码示例。如果您正苦于以下问题:C++ VJSParms_callStaticFunction::GetExceptionRefPointer方法的具体用法?C++ VJSParms_callStaticFunction::GetExceptionRefPointer怎么用?C++ VJSParms_callStaticFunction::GetExceptionRefPointer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VJSParms_callStaticFunction
的用法示例。
在下文中一共展示了VJSParms_callStaticFunction::GetExceptionRefPointer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: do_include
void VJSGlobalClass::do_include( VJSParms_callStaticFunction& inParms, VJSGlobalObject *inGlobalObject)
{
// EvaluateScript() uses NULL (this is default) as inThisObject argument.
// This works fine currently, but would it be better (if any problem) to pass global (application) object instead?
// See WAK0074064.
VFile* file = inParms.RetainFileParam(1, false);
if (file != NULL)
{
bool newlyRegistered = inGlobalObject->RegisterIncludedFile( file); // sc 15/06/2010 the file must be registered
if (inParms.GetBoolParam(2,"refresh","auto") || newlyRegistered)
{
inParms.GetContext().EvaluateScript( file, NULL, inParms.GetExceptionRefPointer());
}
file->Release();
}
else
{
VString pathname;
if (inParms.IsStringParam(1) && inParms.GetStringParam( 1, pathname))
{
VFolder* folder = inGlobalObject->GetRuntimeDelegate()->RetainScriptsFolder();
if (folder != NULL)
{
file = new VFile( *folder, pathname, FPS_POSIX);
bool newlyRegistered = inGlobalObject->RegisterIncludedFile( file); // sc 15/06/2010 the file must be registered
if (inParms.GetBoolParam(2,"refresh","auto") || newlyRegistered)
{
inParms.GetContext().EvaluateScript( file, NULL, inParms.GetExceptionRefPointer());
}
ReleaseRefCountable( &file);
}
ReleaseRefCountable( &folder);
}
else
vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_FILE, "1");
}
}
示例2: do_testMe
void VJSGlobalClass::do_testMe( VJSParms_callStaticFunction& inParms, VJSGlobalObject*)
{
VJSObject globalObject( inParms.GetContext().GetGlobalObject());
VString functionName;
inParms.GetStringParam( 1, functionName);
std::vector<VJSValue> values;
size_t count = inParms.CountParams();
for( size_t i = 2 ; i <= count ; ++i)
values.push_back( inParms.GetParamValue( i));
VJSValue result( inParms.GetContextRef());
bool ok = globalObject.CallMemberFunction( functionName, &values, &result, inParms.GetExceptionRefPointer());
inParms.ReturnValue( result);
}