1 /* Copyright JS Foundation and other contributors, http://js.foundation
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "ecma-alloc.h"
17 #include "ecma-builtins.h"
18 #include "ecma-conversion.h"
19 #include "ecma-exceptions.h"
20 #include "ecma-gc.h"
21 #include "ecma-globals.h"
22 #include "ecma-helpers.h"
23 #include "ecma-builtin-helpers.h"
24 #include "ecma-objects.h"
25 #include "ecma-try-catch-macro.h"
26 #include "jrt.h"
27
28 #define ECMA_BUILTINS_INTERNAL
29 #include "ecma-builtins-internal.h"
30
31 #define BUILTIN_INC_HEADER_NAME "ecma-builtin-error.inc.h"
32 #define BUILTIN_UNDERSCORED_ID error
33 #include "ecma-builtin-internal-routines-template.inc.h"
34
35 /** \addtogroup ecma ECMA
36 * @{
37 *
38 * \addtogroup ecmabuiltins
39 * @{
40 *
41 * \addtogroup error ECMA Error object built-in
42 * @{
43 */
44
45 /**
46 * Handle calling [[Call]] of built-in Error object
47 *
48 * @return ecma value
49 */
50 ecma_value_t
ecma_builtin_error_dispatch_call(const ecma_value_t * arguments_list_p,ecma_length_t arguments_list_len)51 ecma_builtin_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
52 ecma_length_t arguments_list_len) /**< number of arguments */
53 {
54 return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_COMMON, arguments_list_p, arguments_list_len);
55 } /* ecma_builtin_error_dispatch_call */
56
57 /**
58 * Handle calling [[Construct]] of built-in Error object
59 *
60 * @return ecma value
61 */
62 ecma_value_t
ecma_builtin_error_dispatch_construct(const ecma_value_t * arguments_list_p,ecma_length_t arguments_list_len)63 ecma_builtin_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
64 ecma_length_t arguments_list_len) /**< number of arguments */
65 {
66 return ecma_builtin_error_dispatch_call (arguments_list_p, arguments_list_len);
67 } /* ecma_builtin_error_dispatch_construct */
68
69 /**
70 * @}
71 * @}
72 * @}
73 */
74