コード例 #1
0
 /**
 * @brief Copy Constructor
 */
 TestException(const TestException &te)
 {
   m_Message = (&te)->getMessage();
   m_FileName = te.getFileName();
   m_LineNumber = te.getLineNumber();
   updateWhat();
 }
コード例 #2
0
ファイル: V8TestException.cpp プロジェクト: mirror/chromium
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
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);
 }
コード例 #4
0
ファイル: JSTestException.cpp プロジェクト: dzhshf/WebKit
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
0
ファイル: exceptiontest.cpp プロジェクト: ianmartin/GPSTk
// returns 0 if all tests pass
int main()
{
   TestException a;
   try {
      a.funcie();
   } catch (gpstk::Exception& e) {
      cout << "main " << e;
   }
}
コード例 #6
0
ファイル: V8TestException.cpp プロジェクト: mirror/chromium
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
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);
}
コード例 #8
0
static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    TestException* impl = V8TestException::toNative(info.Holder());
    v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
}
コード例 #9
0
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
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());
}
コード例 #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());
}
コード例 #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;
}