KJS
error_object.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef ERROR_OBJECT_H_
00023 #define ERROR_OBJECT_H_
00024
00025 #include "function_object.h"
00026
00027 namespace KJS {
00028
00029 class ErrorInstance : public JSObject {
00030 public:
00031 ErrorInstance(JSObject *proto);
00032
00033 virtual const ClassInfo *classInfo() const { return &info; }
00034 static const ClassInfo info;
00035 };
00036
00037 class ErrorPrototype : public JSObject {
00038 public:
00039 ErrorPrototype(ExecState *exec,
00040 ObjectPrototype *objectProto,
00041 FunctionPrototype *funcProto);
00042 };
00043
00044 class ErrorProtoFunc : public InternalFunctionImp {
00045 public:
00046 ErrorProtoFunc(ExecState*, FunctionPrototype*, const Identifier&);
00047 virtual JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args);
00048 };
00049
00050 class ErrorObjectImp : public InternalFunctionImp {
00051 public:
00052 ErrorObjectImp(ExecState *exec, FunctionPrototype *funcProto,
00053 ErrorPrototype *errorProto);
00054
00055 virtual bool implementsConstruct() const;
00056 virtual JSObject *construct(ExecState *exec, const List &args);
00057
00058 virtual JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args);
00059 };
00060
00061 class NativeErrorPrototype : public JSObject {
00062 public:
00063 NativeErrorPrototype(ExecState *exec, ErrorPrototype *errorProto,
00064 ErrorType et, UString name, UString message);
00065 private:
00066 ErrorType errType;
00067 };
00068
00069 class NativeErrorImp : public InternalFunctionImp {
00070 public:
00071 NativeErrorImp(ExecState *exec, FunctionPrototype *funcProto,
00072 JSObject *prot);
00073
00074 virtual bool implementsConstruct() const;
00075 virtual JSObject *construct(ExecState *exec, const List &args);
00076 virtual JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args);
00077
00078 virtual void mark();
00079
00080 virtual const ClassInfo *classInfo() const { return &info; }
00081 static const ClassInfo info;
00082 private:
00083 JSObject *proto;
00084 };
00085
00086 }
00087
00088 #endif