Esempio n. 1
0
 /**
 * @brief Copy Constructor
 */
 TestException(const TestException &te)
 {
   m_Message = (&te)->getMessage();
   m_FileName = te.getFileName();
   m_LineNumber = te.getLineNumber();
   updateWhat();
 }
Esempio n. 2
0
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());
}
Esempio n. 3
0
 /** 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);
 }
Esempio n. 4
0
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;
}
Esempio n. 5
0
// returns 0 if all tests pass
int main()
{
   TestException a;
   try {
      a.funcie();
   } catch (gpstk::Exception& e) {
      cout << "main " << e;
   }
}
Esempio n. 6
0
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);
}
Esempio n. 7
0
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);
}
static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    TestException* impl = V8TestException::toNative(info.Holder());
    v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
}
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());
}
Esempio n. 10
0
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());
}
Esempio n. 11
0
static v8::Handle<v8::Value> nameAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.TestException.name._get");
    TestException* imp = V8TestException::toNative(info.Holder());
    return v8String(imp->name(), info.GetIsolate());
}
Esempio n. 12
0
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;
}