本文整理汇总了C++中TestException类的典型用法代码示例。如果您正苦于以下问题:C++ TestException类的具体用法?C++ TestException怎么用?C++ TestException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TestException类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestException
/**
* @brief Copy Constructor
*/
TestException(const TestException &te)
{
m_Message = (&te)->getMessage();
m_FileName = te.getFileName();
m_LineNumber = te.getLineNumber();
updateWhat();
}
示例2: readonlyStringAttributeAttributeGetter
static void readonlyStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
TestException* impl = V8TestException::toImpl(holder);
v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolate());
}
示例3: testDerivedClass
/** Try to instantiate a derived class.
*/
void testDerivedClass()
{
TestException t;
shouldEqual(strncmp(t.what(), "qwerty", 6), 0);
TestExceptionWithOverload to;
shouldEqual(strncmp(to.what(), "qwerty", 6), 0);
}
示例4: jsTestExceptionName
JSValue jsTestExceptionName(ExecState* exec, JSValue slotBase, PropertyName)
{
JSTestException* castedThis = jsCast<JSTestException*>(asObject(slotBase));
UNUSED_PARAM(exec);
TestException* impl = static_cast<TestException*>(castedThis->impl());
JSValue result = jsString(exec, impl->name());
return result;
}
示例5: main
// returns 0 if all tests pass
int main()
{
TestException a;
try {
a.funcie();
} catch (gpstk::Exception& e) {
cout << "main " << e;
}
}
示例6: constructor
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) {
ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ConstructionContext, "TestException");
if (UNLIKELY(info.Length() < 1)) {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
return;
}
unsigned argument;
argument = toUInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState);
if (exceptionState.hadException())
return;
TestException* impl = TestException::create(argument);
v8::Local<v8::Object> wrapper = info.Holder();
wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestException::wrapperTypeInfo, wrapper);
v8SetReturnValue(info, wrapper);
}
示例7: nameAttrGetter
static v8::Handle<v8::Value> nameAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
TestException* imp = V8TestException::toNative(info.Holder());
return v8String(imp->name(), info.GetIsolate(), ReturnUnsafeHandle);
}
示例8: toStringMethod
static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestException* impl = V8TestException::toNative(info.Holder());
v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
}
示例9: readonlyStringAttributeAttributeGetter
static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8::Handle<v8::Object> holder = info.Holder();
TestException* impl = V8TestException::toNative(holder);
v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolate());
}
示例10: readonlyUnsignedShortAttributeAttributeGetter
static void readonlyUnsignedShortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestException* impl = V8TestException::toImpl(holder);
v8SetReturnValueUnsigned(info, impl->readonlyUnsignedShortAttribute());
}
示例11: nameAttributeGetter
static void nameAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestException* imp = V8TestException::toNative(info.Holder());
v8SetReturnValueString(info, imp->name(), info.GetIsolate());
return;
}