⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jvm_error.c

📁 java 1.1 gemini 08_16
💻 C
字号:
/*****************************************************************************
*  Copyright Statement:
*  --------------------
*  This software is protected by Copyright and the information contained
*  herein is confidential. The software may not be copied and the information
*  contained herein may not be used or disclosed except with the written
*  permission of MediaTek Inc. (C) 2001
*
*****************************************************************************/

/*****************************************************************************
 *
 * Filename:
 * ---------
 *   jvm_error.c
 *
 * Project:
 * --------
 *   Maui_Software
 *
 * Description:
 * ------------
 *   This file implements general VM error messages
 *
 * Author:
 * -------
 * -------
 *
 *============================================================================
 *             HISTORY
 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *------------------------------------------------------------------------------
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *------------------------------------------------------------------------------
 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *============================================================================
 ****************************************************************************/

/****************************************************************************
 * Include header files
 ****************************************************************************/
#include "kal_release.h"
#include "jal.h"

 /* MIDP Success */
const char *midp_success_msg[] = 
{
    "MIDP success"
};

/* MIDP Persistent Storage Error */
const char *midp_storage_error_msg[] = 
{
    "MIDP filename too long",
    "MIDP storageOpen() failed",
    "MIDP storageClose() failed",
    "MIDP storageRead() failed",
    "MIDP storageWrite() failed",
    "MIDP storage full",
    "MIDP storagePosition() failed",
    "MIDP storageSizeOf() failed",
    "MIDP storageTruncate() failed",
    "MIDP storageDeleteFile() failed",
    "MIDP renamed file does not exist",
    "MIDP storageRenameFile() failed"
};

/* MIDP Comm Protocol Error */
const char *midp_commprotocol_error_msg[] = 
{
    "MIDP open comm port failed",
    "MIDP write comm port failed",
    "MIDP read comm port failed"
};

/* MIDP Connection Exception */
const char *midp_connect_error_msg[] = 
{
    "javax/microedition/io/ConnectionNotFoundException",
    "java/io/IOException"
};

/* Invalid Error Message */
const char *midp_invalid_error_msg[] = 
{
    "MIDP invalid msg"
};

const char **midp_error_msg[] = 
{
    midp_success_msg,
    midp_storage_error_msg,
    midp_commprotocol_error_msg,
    midp_connect_error_msg,
    midp_invalid_error_msg
};


/*****************************************************************************
 * FUNCTION
 *  getErrorMsg
 * DESCRIPTION
 *  
 * PARAMETERS
 *  major_code      [IN]        
 *  minor_code      [IN]        
 * RETURNS
 *  
 *****************************************************************************/
char *getErrorMsg(midp_error_code major_code, midp_error_code minor_code)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* kal_trace(TRACE_INFO, J2ME_MSG3, major_code, minor_code); */
    return (char*)midp_error_msg[major_code >> 16][minor_code - major_code];
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -