Heap::ErrorObject::ErrorObject(InternalClass *ic, QV4::Object *prototype, const ValueRef message, ErrorType t)
: Heap::Object(ic, prototype)
{
- subtype = t;
+ errorType = t;
Scope scope(ic->engine);
Scoped<QV4::ErrorObject> e(scope, this);
Heap::ErrorObject::ErrorObject(InternalClass *ic, QV4::Object *prototype, const QString &message, ErrorObject::ErrorType t)
: Heap::Object(ic, prototype)
{
- subtype = t;
+ errorType = t;
Scope scope(ic->engine);
Scoped<QV4::ErrorObject> e(scope, this);
Heap::ErrorObject::ErrorObject(InternalClass *ic, QV4::Object *prototype, const QString &message, const QString &fileName, int line, int column, ErrorObject::ErrorType t)
: Heap::Object(ic, prototype)
{
- subtype = t;
+ errorType = t;
Scope scope(ic->engine);
Scoped<QV4::ErrorObject> e(scope, this);
ErrorObject(InternalClass *ic, QV4::Object *prototype, const ValueRef message, ErrorType t = Error);
ErrorObject(InternalClass *ic, QV4::Object *prototype, const QString &message, ErrorType t = Error);
ErrorObject(InternalClass *ic, QV4::Object *prototype, const QString &message, const QString &fileName, int line, int column, ErrorType t = Error);
+
+ ErrorType errorType;
StackTrace stackTrace;
String *stack;
};
inline SyntaxErrorObject *ErrorObject::asSyntaxError()
{
- return subtype() == QV4::Heap::ErrorObject::SyntaxError ? static_cast<SyntaxErrorObject *>(this) : 0;
+ return d()->errorType == QV4::Heap::ErrorObject::SyntaxError ? static_cast<SyntaxErrorObject *>(this) : 0;
}
}