SBjsiLog.h
上传用户:xqtpzdz
上传日期:2022-05-21
资源大小:1764k
文件大小:4k
源码类别:

xml/soap/webservice

开发平台:

Visual C++

  1. /*****************************************************************************
  2.  *****************************************************************************
  3.  *
  4.  * Logging for the SBjsi JavaScript (ECMAScript) Engine Interface
  5.  *
  6.  *****************************************************************************
  7.  ****************************************************************************/
  8. /****************License************************************************
  9.  * Vocalocity OpenVXI
  10.  * Copyright (C) 2004-2005 by Vocalocity, Inc. All Rights Reserved.
  11.  * This program is free software; you can redistribute it and/or
  12.  * modify it under the terms of the GNU General Public License
  13.  * as published by the Free Software Foundation; either version 2
  14.  * of the License, or (at your option) any later version.
  15.  *  
  16.  * This program is distributed in the hope that it will be useful,
  17.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.  * GNU General Public License for more details.
  20.  *
  21.  * You should have received a copy of the GNU General Public License
  22.  * along with this program; if not, write to the Free Software
  23.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  24.  * Vocalocity, the Vocalocity logo, and VocalOS are trademarks or 
  25.  * registered trademarks of Vocalocity, Inc. 
  26.  * OpenVXI is a trademark of Scansoft, Inc. and used under license 
  27.  * by Vocalocity.
  28.  ***********************************************************************/
  29. #ifndef _SBJSI_LOG_H
  30. #define _SBJSI_LOG_H
  31. #include "VXIlog.h"                     /* Logging interface header */
  32. #ifdef __cplusplus
  33. #include "SBjsiLogger.hpp"             /* Logging base class */
  34. #endif
  35. /* Module names for error logging */
  36. #ifndef MODULE_PREFIX
  37. #define MODULE_PREFIX  COMPANY_DOMAIN L"."
  38. #endif
  39. #ifdef OPENVXI
  40. #define MODULE_SBJSI                  MODULE_PREFIX L"OSBjsi"
  41. #define MODULE_SBJSISE                MODULE_PREFIX L"OSBjsiSe"
  42. #define SBJSI_IMPLEMENTATION_NAME     COMPANY_DOMAIN L".OSBjsi"
  43. #define SBJSISE_IMPLEMENTATION_NAME   COMPANY_DOMAIN L".OSBjsiSE"
  44. #else
  45. #define MODULE_SBJSI                  MODULE_PREFIX L"SBjsi"
  46. #define MODULE_SBJSISE                MODULE_PREFIX L"SBjsiSe"
  47. #define SBJSI_IMPLEMENTATION_NAME     COMPANY_DOMAIN L".SBjsi"
  48. #define SBJSISE_IMPLEMENTATION_NAME   COMPANY_DOMAIN L".OSBjsiSE"
  49. #endif
  50. /* Error codes, module specific, see SBjsiErrors.xml for severity/text */
  51. enum JsiError {
  52.   /* SBjsi defined errors, out of service */
  53.   JSI_ERROR_INIT_FAILED = 100,
  54.   JSI_ERROR_INTERFACE_ALLOC_FAILED,
  55.   JSI_ERROR_NULL_INTERFACE_PTR,
  56.   JSI_ERROR_OUT_OF_MEMORY,
  57.   /* SBjsi defined errors, service affecting */
  58.   JSI_ERROR_INVALID_ARG = 200,
  59.   JSI_ERROR_NOT_INITIALIZED,
  60.   JSI_ERROR_USER_EXCEPTION,
  61.   /* SBjsi defined warnings */
  62.   JSI_WARN_MAX_BRANCHES_EXCEEDED = 300,
  63.   JSI_WARN_MAX_STATEMENTS_EXCEEDED,
  64.   
  65.   /* Errors defined by the ECMA-262 3rd Edition language standard */
  66.   JSI_ERROR_ECMA_ERROR = 400,
  67.   JSI_ERROR_ECMA_SYNTAX_ERROR,
  68.   JSI_ERROR_ECMA_REFERENCE_ERROR,
  69.   JSI_ERROR_ECMA_RANGE_ERROR,
  70.   JSI_ERROR_ECMA_TYPE_ERROR,
  71.   JSI_ERROR_ECMA_EVAL_ERROR,
  72.   JSI_ERROR_ECMA_URI_ERROR,
  73.   /* SpiderMonkey errors/warnings */
  74.   JSI_ERROR_SM_SCRIPT_ERROR = 500,    /* Engine error */
  75.   JSI_ERROR_SM_SCRIPT_EXCEPTION,      /* Engine exception */
  76.   JSI_WARN_SM_SCRIPT_WARNING,        /* Engine warning */
  77.   JSI_WARN_SM_SCRIPT_STRICT,         /* Warning due to strict checks being
  78.  enabled */
  79.   /* Nombas ScriptEase defined errors */
  80.   JSI_ERROR_SE_CONVERSION_ERROR = 600,
  81.   JSI_ERROR_SE_REGEXP_ERROR,
  82.   JSI_ERROR_SE_INTERNAL_ERROR,
  83.   JSI_ERROR_SE_SOURCE_ERROR,
  84.   JSI_ERROR_SE_MATH_ERROR,
  85.   JSI_ERROR_SE_SECURITY_ERROR,
  86.   JSI_ERROR_SE_MEMORY_ERROR,
  87.   JSI_ERROR_SE_SYSTEM_ERROR,
  88.   JSI_ERROR_SE_DSP_ERROR,
  89.   JSI_ERROR_SE_DEBUGGER_ERROR
  90. };
  91. /* Generic diagnostic log tags */
  92. #define SBJSI_LOG_API             0     /* Log all API calls */
  93. #define SBJSI_LOG_CONTEXT         1     /* Log context diagnostics */
  94. #define SBJSI_LOG_GC              2     /* Log garbage collection */
  95. /* #define SBJSI_                 3        currently unallocated */
  96. #define SBJSI_LOG_SCOPE           4     /* Log scope diagnostics */
  97. /* ScriptEase specific diagnostic log tags */
  98. #define SBJSI_LOG_SE_ERRMSGS    200     /* Log ScriptEase error messages */
  99. #define SBJSI_LOG_SE_DEBUGMSGS  201     /* Log debug log messages */
  100. #endif  /* include guard */