{
type = Type_ErrorObject;
subtype = t;
- initClass(engine);
+ defineAccessorProperty(engine, QStringLiteral("stack"), ErrorObject::method_get_stack, 0);
if (!message.isUndefined())
defineDefaultProperty(engine->newString(QStringLiteral("message")), message);
return Value::fromString(ctx, str);
}
-
-#include "qv4errorobject_p_jsclass.cpp"
struct SyntaxErrorObject;
-struct QV4_JS_CLASS(ErrorObject): Object {
+struct ErrorObject: Object {
enum ErrorType {
Error,
EvalError,
};
ErrorObject(ExecutionEngine *engine, const Value &message, ErrorType t = Error);
- void initClass(ExecutionEngine *engine);
SyntaxErrorObject *asSyntaxError();
ExecutionEngine::StackTrace stackTrace;
Value stack;
- static Value method_get_stack(SimpleCallContext *ctx) QV4_ANNOTATE(attributes QV4::Attr_NotEnumerable);
+ static Value method_get_stack(SimpleCallContext *ctx);
};
struct EvalErrorObject: ErrorObject {
JS_CLASS_SOURCES += $$PWD/qv4dateobject_p.h \
$$PWD/qv4variantobject_p.h \
- $$PWD/qv4sequenceobject_p.h \
- $$PWD/qv4errorobject_p.h
+ $$PWD/qv4sequenceobject_p.h
js_class_bindings.output = ${QMAKE_FILE_BASE}_jsclass.cpp
js_class_bindings.input = JS_CLASS_SOURCES