#ifndef _ERROR_OBJECT_H_
#define _ERROR_OBJECT_H_
#include "internal.h"
#include "function_object.h"
namespace KJS {
class ErrorPrototypeImp : public ObjectImp {
public:
ErrorPrototypeImp(ExecState *exec,
ObjectPrototypeImp *objectProto,
FunctionPrototypeImp *funcProto);
};
class ErrorProtoFuncImp : public InternalFunctionImp {
public:
ErrorProtoFuncImp(ExecState *exec, FunctionPrototypeImp *funcProto);
virtual bool implementsCall() const;
virtual Value call(ExecState *exec, Object &thisObj, const List &args);
};
class ErrorObjectImp : public InternalFunctionImp {
public:
ErrorObjectImp(ExecState *exec, FunctionPrototypeImp *funcProto,
ErrorPrototypeImp *errorProto);
virtual bool implementsConstruct() const;
virtual Object construct(ExecState *exec, const List &args);
virtual bool implementsCall() const;
virtual Value call(ExecState *exec, Object &thisObj, const List &args);
};
class NativeErrorPrototypeImp : public ObjectImp {
public:
NativeErrorPrototypeImp(ExecState *exec, ErrorPrototypeImp *errorProto,
ErrorType et, UString name, UString message);
private:
ErrorType errType;
};
class NativeErrorImp : public InternalFunctionImp {
public:
NativeErrorImp(ExecState *exec, FunctionPrototypeImp *funcProto,
const Object &prot);
virtual bool implementsConstruct() const;
virtual Object construct(ExecState *exec, const List &args);
virtual bool implementsCall() const;
virtual Value call(ExecState *exec, Object &thisObj, const List &args);
virtual void mark();
virtual const ClassInfo *classInfo() const { return &info; }
static const ClassInfo info;
private:
ObjectImp *proto;
};
};
#endif