mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Introducing native ecma error types and ecma_NewStandardError interface.
This commit is contained in:
parent
4395da05d3
commit
cdde0900e3
39
src/libecmaoperations/ecma-exceptions.c
Normal file
39
src/libecmaoperations/ecma-exceptions.c
Normal file
@ -0,0 +1,39 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "ecma-exceptions.h"
|
||||
#include "ecma-globals.h"
|
||||
#include "ecma-helpers.h"
|
||||
#include "globals.h"
|
||||
|
||||
/** \addtogroup ecma ---TODO---
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup exceptions Exceptions
|
||||
* @{
|
||||
*/
|
||||
|
||||
ecma_Object_t*
|
||||
ecma_NewStandardError( ecma_StandardError_t error_type)
|
||||
{
|
||||
JERRY_UNIMPLEMENTED_REF_UNUSED_VARS( error_type);
|
||||
} /* ecma_NewStandardError */
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
53
src/libecmaoperations/ecma-exceptions.h
Normal file
53
src/libecmaoperations/ecma-exceptions.h
Normal file
@ -0,0 +1,53 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ECMA_EXCEPTIONS_H
|
||||
#define ECMA_EXCEPTIONS_H
|
||||
|
||||
#include "ecma-globals.h"
|
||||
#include "globals.h"
|
||||
|
||||
/** \addtogroup ecma ---TODO---
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup exceptions Exceptions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Native errors.
|
||||
*
|
||||
* See also: 15.11.6
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ECMA_ERROR_EVAL, /**< EvalError */
|
||||
ECMA_ERROR_RANGE, /**< RangeError */
|
||||
ECMA_ERROR_REFERENCE, /**< ReferenceError */
|
||||
ECMA_ERROR_SYNTAX, /**< SyntaxError */
|
||||
ECMA_ERROR_TYPE, /**< TypeError */
|
||||
ECMA_ERROR_URI /**< URIError */
|
||||
} ecma_StandardError_t;
|
||||
|
||||
extern ecma_Object_t *ecma_NewStandardError( ecma_StandardError_t error_type);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !ECMA_EXCEPTIONS_H */
|
||||
Loading…
x
Reference in New Issue
Block a user