aboutsummaryrefslogtreecommitdiffstats
path: root/qv4ecmaobjects_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2012-11-14 16:44:08 +0100
committerLars Knoll <lars.knoll@digia.com>2012-11-15 13:45:42 +0100
commit72b478b8a2a27047df7fab09142c01a9b7a7ca6e (patch)
treeae669fad51626f20084cbd8ee47f05a3063e082b /qv4ecmaobjects_p.h
parentbd63199bba91769487d24f3a8635f20105eeff06 (diff)
Added all missing error objects.
Change-Id: I806184c5593af44d79b21afb1e3235ec9afa1e2a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'qv4ecmaobjects_p.h')
-rw-r--r--qv4ecmaobjects_p.h83
1 files changed, 82 insertions, 1 deletions
diff --git a/qv4ecmaobjects_p.h b/qv4ecmaobjects_p.h
index 3f78feaa64..031a953562 100644
--- a/qv4ecmaobjects_p.h
+++ b/qv4ecmaobjects_p.h
@@ -302,15 +302,96 @@ struct ErrorCtor: FunctionObject
virtual void call(Context *ctx);
};
+struct EvalErrorCtor: ErrorCtor
+{
+ EvalErrorCtor(Context *scope): ErrorCtor(scope) {}
+
+ virtual void construct(Context *ctx);
+};
+
+struct RangeErrorCtor: ErrorCtor
+{
+ RangeErrorCtor(Context *scope): ErrorCtor(scope) {}
+
+ virtual void construct(Context *ctx);
+};
+
+struct ReferenceErrorCtor: ErrorCtor
+{
+ ReferenceErrorCtor(Context *scope): ErrorCtor(scope) {}
+
+ virtual void construct(Context *ctx);
+};
+
+struct SyntaxErrorCtor: ErrorCtor
+{
+ SyntaxErrorCtor(Context *scope): ErrorCtor(scope) {}
+
+ virtual void construct(Context *ctx);
+};
+
+struct TypeErrorCtor: ErrorCtor
+{
+ TypeErrorCtor(Context *scope): ErrorCtor(scope) {}
+
+ virtual void construct(Context *ctx);
+};
+
+struct URIErrorCtor: ErrorCtor
+{
+ URIErrorCtor(Context *scope): ErrorCtor(scope) {}
+
+ virtual void construct(Context *ctx);
+};
+
+
struct ErrorPrototype: ErrorObject
{
// ### shouldn't be undefined
ErrorPrototype(): ErrorObject(Value::undefinedValue()) {}
- void init(Context *ctx, const Value &ctor);
+ void init(Context *ctx, const Value &ctor) { init(ctx, ctor, this); }
+ static void init(Context *ctx, const Value &ctor, Object *obj);
static void method_toString(Context *ctx);
};
+struct EvalErrorPrototype: EvalErrorObject
+{
+ EvalErrorPrototype(Context *ctx): EvalErrorObject(ctx) {}
+ void init(Context *ctx, const Value &ctor) { ErrorPrototype::init(ctx, ctor, this); }
+};
+
+struct RangeErrorPrototype: RangeErrorObject
+{
+ RangeErrorPrototype(Context *ctx): RangeErrorObject(ctx) {}
+ void init(Context *ctx, const Value &ctor) { ErrorPrototype::init(ctx, ctor, this); }
+};
+
+struct ReferenceErrorPrototype: ReferenceErrorObject
+{
+ ReferenceErrorPrototype(Context *ctx): ReferenceErrorObject(ctx) {}
+ void init(Context *ctx, const Value &ctor) { ErrorPrototype::init(ctx, ctor, this); }
+};
+
+struct SyntaxErrorPrototype: SyntaxErrorObject
+{
+ SyntaxErrorPrototype(Context *ctx): SyntaxErrorObject(ctx) {}
+ void init(Context *ctx, const Value &ctor) { ErrorPrototype::init(ctx, ctor, this); }
+};
+
+struct TypeErrorPrototype: TypeErrorObject
+{
+ TypeErrorPrototype(Context *ctx): TypeErrorObject(ctx) {}
+ void init(Context *ctx, const Value &ctor) { ErrorPrototype::init(ctx, ctor, this); }
+};
+
+struct URIErrorPrototype: URIErrorObject
+{
+ URIErrorPrototype(Context *ctx): URIErrorObject(ctx) {}
+ void init(Context *ctx, const Value &ctor) { ErrorPrototype::init(ctx, ctor, this); }
+};
+
+
struct MathObject: Object
{
MathObject(Context *ctx);