Introducing native ecma error types and ecma_NewStandardError interface.

This commit is contained in:
Ruben Ayrapetyan 2014-07-15 21:13:58 +04:00
parent 4395da05d3
commit cdde0900e3
2 changed files with 92 additions and 0 deletions

View 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 */
/**
* @}
* @}
*/

View 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 */