ErrorCodesLib.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?php
  2. namespace ModulesGarden\ProxmoxAddon\Core\HandlerError\ErrorCodes;
  3. class ErrorCodesLib extends ErrorCodes
  4. {
  5. const CORE_CT_000001 = 'Provided controller does not exists';
  6. const CORE_CT_000002 = 'Provided controller does not exists';
  7. const CORE_ACT_000001 = 'Database error';
  8. const CORE_ACT_000002 = 'Database error';
  9. const CORE_ACT_000003 = 'Database error';
  10. const CORE_ACT_000004 = 'Database error';
  11. /**
  12. * Default error, used when no error code defined
  13. */
  14. const CORE_ERR_000001 = [
  15. self::MESSAGE => 'Uncategorised error occured',
  16. self::CODE => 'CORE_ERR_000001',
  17. self::DEV_MESSAGE => "It's a default error code, used when no error code was specified"
  18. ];
  19. /**
  20. * Logs class
  21. */
  22. const CORE_LOG_000001 = [
  23. self::MESSAGE => 'Method does not exist in the Logger class',
  24. self::CODE => 'CORE_LOG_000001',
  25. ];
  26. /**
  27. * Register cache
  28. */
  29. const CORE_CREG_000001 = [
  30. self::MESSAGE => 'Register key already exists',
  31. self::CODE => 'CORE_CREG_000001',
  32. ];
  33. /**
  34. * Database cache
  35. */
  36. const CORE_CDB_000001 = [
  37. self::MESSAGE => 'The callback needs to ba a callable',
  38. self::CODE => 'CORE_CDB_000001',
  39. ];
  40. /**
  41. * GRAPHS
  42. */
  43. const CORE_GRA_000001 = [
  44. self::MESSAGE => 'Tooltip mode does not exists',
  45. self::CODE => 'CORE_GRA_000001',
  46. ];
  47. const CORE_GRA_000002 = [
  48. self::MESSAGE => 'Width value is not numeric(:width:)',
  49. self::CODE => 'CORE_GRA_000002',
  50. ];
  51. const CORE_GRA_000003 = [
  52. self::MESSAGE => 'Height value is not numeric(:height:)',
  53. self::CODE => 'CORE_GRA_000003',
  54. ];
  55. /**
  56. * CURL
  57. */
  58. const CORE_CURL_000001 = [
  59. self::MESSAGE => 'CURL error',
  60. self::CODE => 'CORE_CURL_000001',
  61. ];
  62. const CORE_CURL_000002 = [
  63. self::MESSAGE => 'CURL error',
  64. self::CODE => 'CORE_CURL_000002',
  65. ];
  66. /**
  67. * WHMCS API core lib
  68. */
  69. const CORE_WAPI_000001 = [
  70. self::MESSAGE => 'No WHMCS files found',
  71. self::CODE => 'CORE_WAPI_000001',
  72. ];
  73. const CORE_WAPI_000002 = [
  74. self::MESSAGE => 'WHMCS API error',
  75. self::CODE => 'CORE_WAPI_000002',
  76. ];
  77. const CORE_WAPI_000003 = [
  78. self::MESSAGE => 'There is no admin with ID equal to ":adminId:"',
  79. self::CODE => 'CORE_WAPI_000003',
  80. ];
  81. const CORE_WAPI_000004 = [
  82. self::MESSAGE => 'WHMCS API error',
  83. self::CODE => 'CORE_WAPI_000004',
  84. ];
  85. }