errcode.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /**
  17. * @file errcode.h
  18. * @date Wed Feb 29 18:58:30 2012
  19. *
  20. * @brief Host-visible error code definition
  21. */
  22. #ifndef BEIHAI_ERRCODE_H
  23. #define BEIHAI_ERRCODE_H
  24. /**
  25. * Responses to all remote requests from host to Beihai runtime has a
  26. * return error code, which is used to indicate the processing result:
  27. * successful or any error occurs. The following definitions include
  28. * all those error codes that may be returned to host.
  29. */
  30. enum {
  31. BHE_SUCCESS = 0x000, /* Successful */
  32. /* General errors: 0x100 */
  33. BHE_OUT_OF_MEMORY = 0x101, /* Out of memory */
  34. BHE_BAD_PARAMETER = 0x102, /* Bad parameters to native */
  35. BHE_INSUFFICIENT_BUFFER = 0x103,
  36. BHE_MUTEX_INIT_FAIL = 0x104,
  37. BHE_COND_INIT_FAIL = 0x105, /* Cond init fail is not return to
  38. * host now, it may be used later.
  39. */
  40. BHE_WD_TIMEOUT = 0x106, /* Watchdog time out */
  41. /* Communication: 0x200 */
  42. BHE_MAILBOX_NOT_FOUND = 0x201, /* Mailbox not found */
  43. BHE_MSG_QUEUE_IS_FULL = 0x202, /* Message queue is full */
  44. BHE_MAILBOX_DENIED = 0x203, /* Mailbox is denied by firewall */
  45. /* Applet manager: 0x300 */
  46. BHE_LOAD_JEFF_FAIL = 0x303, /* JEFF file load fail, OOM or file
  47. * format error not distinct by
  48. * current JEFF loading
  49. * process (bool jeff_loader_load).
  50. */
  51. BHE_PACKAGE_NOT_FOUND = 0x304, /* Request operation on a package,
  52. * but it does not exist.
  53. */
  54. BHE_EXIST_LIVE_SESSION = 0x305, /* Uninstall package fail because of
  55. * live session exist.
  56. */
  57. BHE_VM_INSTANCE_INIT_FAIL = 0x306, /* VM instance init fail when create
  58. * session.
  59. */
  60. BHE_QUERY_PROP_NOT_SUPPORT = 0x307, /* Query applet property that Beihai
  61. * does not support.
  62. */
  63. BHE_INVALID_BPK_FILE = 0x308, /* Incorrect Beihai package format */
  64. BHE_VM_INSTNACE_NOT_FOUND = 0x312, /* VM instance not found */
  65. BHE_STARTING_JDWP_FAIL = 0x313, /* JDWP agent starting fail */
  66. BHE_GROUP_CHECK_FAIL = 0x314, /* Group access checking fail*/
  67. /* Applet instance: 0x400 */
  68. BHE_UNCAUGHT_EXCEPTION = 0x401, /* uncaught exception */
  69. BHE_APPLET_BAD_PARAMETER = 0x402, /* Bad parameters to applet */
  70. BHE_APPLET_SMALL_BUFFER = 0x403, /* Small response buffer */
  71. /*TODO: Should be removed these UI error code when integrate with ME 9 */
  72. /* UI: 0x500 */
  73. BHE_UI_EXCEPTION = 0x501,
  74. BHE_UI_ILLEGAL_USE = 0x502,
  75. BHE_UI_ILLEGAL_PARAMETER = 0x503,
  76. BHE_UI_NOT_INITIALIZED = 0x504,
  77. BHE_UI_NOT_SUPPORTED = 0x505,
  78. BHE_UI_OUT_OF_RESOURCES = 0x506
  79. };
  80. #endif