Deozaan

error_codes.gd

Apr 6th, 2021 (edited)
197
216 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class_name ErrorCode
  2. extends Object
  3.  
  4. const _codes := PoolStringArray([
  5.     "OK",
  6.     "FAILED",
  7.     "ERR_UNAVAILABLE",
  8.     "ERR_UNCONFIGURED",
  9.     "ERR_UNAUTHORIZED",
  10.     "ERR_PARAMETER_RANGE_ERROR",
  11.     "ERR_OUT_OF_MEMORY",
  12.     "ERR_FILE_NOT_FOUND",
  13.     "ERR_FILE_BAD_DRIVE",
  14.     "ERR_FILE_BAD_PATH",
  15.     "ERR_FILE_NO_PERMISSION",
  16.     "ERR_FILE_ALREADY_IN_USE",
  17.     "ERR_FILE_CANT_OPEN",
  18.     "ERR_FILE_CANT_WRITE",
  19.     "ERR_FILE_CANT_READ",
  20.     "ERR_FILE_UNRECOGNIZED",
  21.     "ERR_FILE_CORRUPT",
  22.     "ERR_FILE_MISSING_DEPENDENCIES",
  23.     "ERR_FILE_EOF",
  24.     "ERR_CANT_OPEN",
  25.     "ERR_CANT_CREATE",
  26.     "ERR_QUERY_FAILED",
  27.     "ERR_ALREADY_IN_USE",
  28.     "ERR_LOCKED",
  29.     "ERR_TIMEOUT",
  30.     "ERR_CANT_CONNECT",
  31.     "ERR_CANT_RESOLVE",
  32.     "ERR_CONNECTION_ERROR",
  33.     "ERR_CANT_ACQUIRE_RESOURCE",
  34.     "ERR_CANT_FORK",
  35.     "ERR_INVALID_DATA",
  36.     "ERR_INVALID_PARAMETER",
  37.     "ERR_ALREADY_EXISTS",
  38.     "ERR_DOES_NOT_EXIST",
  39.     "ERR_DATABASE_CANT_READ",
  40.     "ERR_DATABASE_CANT_WRITE",
  41.     "ERR_COMPILATION_FAILED",
  42.     "ERR_METHOD_NOT_FOUND",
  43.     "ERR_LINK_FAILED",
  44.     "ERR_SCRIPT_FAILED",
  45.     "ERR_CYCLIC_LINK",
  46.     "ERR_INVALID_DECLARATION",
  47.     "ERR_DUPLICATE_SYMBOL",
  48.     "ERR_PARSE_ERROR",
  49.     "ERR_BUSY",
  50.     "ERR_SKIP",
  51.     "ERR_HELP",
  52.     "ERR_BUG",
  53.     "ERR_PRINTER_ON_FIRE",
  54. ])
  55.  
  56.  
  57. static func humanize(err : int) -> String:
  58.     return _codes[err]
  59.  
RAW Paste Data