This is a port of the mruby/c tutorial Chapter 03 to the mbed environment.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers errorcode.h Source File

errorcode.h

Go to the documentation of this file.
00001 /*! @file
00002   @brief
00003 
00004 
00005   <pre>
00006   Copyright (C) 2015 Kyushu Institute of Technology.
00007   Copyright (C) 2015 Shimane IT Open-Innovation Center.
00008 
00009   This file is distributed under BSD 3-Clause License.
00010 
00011 
00012   </pre>
00013 */
00014 
00015 #ifndef MRBC_SRC_ERRORCODE_H_
00016 #define MRBC_SRC_ERRORCODE_H_
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00022 
00023 /* no error */
00024 #define NO_ERROR 0
00025 
00026 /* unknown */
00027 #define UNKNOWN_ERROR 0x0000ffff
00028 
00029 /* load_file */
00030 #define LOAD_FILE_ERROR (0x0100 << 16)
00031 #define LOAD_FILE_ERROR_MALLOC (LOAD_FILE_ERROR | 0x0001)
00032 #define LOAD_FILE_ERROR_NOFILE (LOAD_FILE_ERROR | 0x0002)
00033 
00034 #define LOAD_FILE_HEADER_ERROR (0x0101 << 16)
00035 #define LOAD_FILE_HEADER_ERROR_RITE (LOAD_FILE_HEADER_ERROR) | 0x0001)
00036 #define LOAD_FILE_HEADER_ERROR_VERSION (LOAD_FILE_HEADER_ERROR | 0x0002)
00037 #define LOAD_FILE_HEADER_ERROR_CRC (LOAD_FILE_HEADER_ERROR | 0x0003)
00038 #define LOAD_FILE_HEADER_ERROR_MATZ (LOAD_FILE_HEADER_ERROR | 0x0004)
00039 
00040 #define LOAD_FILE_IREP_ERROR (0x0102 << 16)
00041 #define LOAD_FILE_IREP_ERROR_IREP (LOAD_FILE_IREP_ERROR | 0x0001)
00042 #define LOAD_FILE_IREP_ERROR_VERSION (LOAD_FILE_IREP_ERROR | 0x0002)
00043 #define LOAD_FILE_IREP_ERROR_ALLOCATION (LOAD_FILE_IREP_ERROR | 0x0003)
00044 
00045 /* VM execution */
00046 #define VM_EXEC_ERROR (0x1000 << 16)
00047 #define VM_EXEC_STATIC_OVWEFLOW_VM (VM_EXEC_ERROR | 0x0001)
00048 #define VM_EXEC_STATIC_OVWEFLOW_IREP (VM_EXEC_ERROR | 0x0002)
00049 #define VM_EXEC_STATIC_OVWEFLOW_CALLINFO (VM_EXEC_ERROR | 0x0003)
00050 
00051 
00052 #ifdef __cplusplus
00053 }
00054 #endif
00055 #endif
00056