5#ifndef QV4DOMERRORS_P_H
6#define QV4DOMERRORS_P_H
19#include <QtCore/private/qglobal_p.h>
24#define DOMEXCEPTION_INDEX_SIZE_ERR 1
25#define DOMEXCEPTION_DOMSTRING_SIZE_ERR 2
26#define DOMEXCEPTION_HIERARCHY_REQUEST_ERR 3
27#define DOMEXCEPTION_WRONG_DOCUMENT_ERR 4
28#define DOMEXCEPTION_INVALID_CHARACTER_ERR 5
29#define DOMEXCEPTION_NO_DATA_ALLOWED_ERR 6
30#define DOMEXCEPTION_NO_MODIFICATION_ALLOWED_ERR 7
31#define DOMEXCEPTION_NOT_FOUND_ERR 8
32#define DOMEXCEPTION_NOT_SUPPORTED_ERR 9
33#define DOMEXCEPTION_INUSE_ATTRIBUTE_ERR 10
34#define DOMEXCEPTION_INVALID_STATE_ERR 11
35#define DOMEXCEPTION_SYNTAX_ERR 12
36#define DOMEXCEPTION_INVALID_MODIFICATION_ERR 13
37#define DOMEXCEPTION_NAMESPACE_ERR 14
38#define DOMEXCEPTION_INVALID_ACCESS_ERR 15
39#define DOMEXCEPTION_VALIDATION_ERR 16
40#define DOMEXCEPTION_TYPE_MISMATCH_ERR 17
42#define THROW_DOM(error, string) {
43 QV4::ScopedValue v(scope, scope.engine->newString(QStringLiteral(string)));
44 QV4::ScopedObject ex(scope, scope.engine->newErrorObject(v));
45 ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))), QV4::ScopedValue(scope, QV4::Value::fromInt32(error)));
46 return scope.engine->throwError(ex); \
47}
50struct ExecutionEngine;
void qt_add_domexceptions(ExecutionEngine *e)
#define DOMEXCEPTION_NAMESPACE_ERR
#define DOMEXCEPTION_HIERARCHY_REQUEST_ERR
#define DOMEXCEPTION_INVALID_ACCESS_ERR
#define DOMEXCEPTION_NOT_SUPPORTED_ERR
#define DOMEXCEPTION_SYNTAX_ERR
#define DOMEXCEPTION_NO_DATA_ALLOWED_ERR
#define DOMEXCEPTION_INDEX_SIZE_ERR
void qt_add_domexceptions(QV4::ExecutionEngine *e)
#define DOMEXCEPTION_WRONG_DOCUMENT_ERR
#define DOMEXCEPTION_INVALID_STATE_ERR
#define DOMEXCEPTION_INUSE_ATTRIBUTE_ERR
#define DOMEXCEPTION_VALIDATION_ERR
#define DOMEXCEPTION_DOMSTRING_SIZE_ERR
#define DOMEXCEPTION_INVALID_CHARACTER_ERR
#define DOMEXCEPTION_NO_MODIFICATION_ALLOWED_ERR
#define DOMEXCEPTION_NOT_FOUND_ERR
#define DOMEXCEPTION_TYPE_MISMATCH_ERR
#define DOMEXCEPTION_INVALID_MODIFICATION_ERR