core/hle: Reorganize ErrorModule enum numerically

Reorganizes the ErrorModule enum in result.h by grouping error codes into
numerical ranges with descriptive comments. This improves readability and
makes it easier to:

- Find specific modules by their number
- See which numbers are used/unused in each range
- Understand the overall distribution of module numbers

Also standardizes naming conventions across modules and fixes some
inconsistent casing (e.g. FS -> Fs, HDCP -> Hdcp).

REFS: switchbrew.org/w/index.php?title=Error_codes
This commit is contained in:
Zephyron 2025-01-25 18:02:43 +10:00
parent 5ba970b574
commit b55be320b7

View file

@ -17,172 +17,239 @@
* contained. * contained.
*/ */
enum class ErrorModule : u32 { enum class ErrorModule : u32 {
// 0-9
Common = 0, Common = 0,
Kernel = 1, Svc = 1,
FS = 2, Fs = 2,
OS = 3, // used for Memory, Thread, Mutex, Nvidia Os = 3,
HTCS = 4, Htcs = 4,
NCM = 5, Ncm = 5,
DD = 6, Dd = 6,
LR = 8, Osdbg = 7,
Loader = 9, Lr = 8,
CMIF = 10, Ldr = 9,
HIPC = 11,
TMA = 12, // 10-19
DMNT = 13, Sf = 10,
GDS = 14, SfHipc = 11,
PM = 15, Tma = 12,
NS = 16, Dmnt = 13,
BSDSockets = 17, Gds = 14,
HTC = 18, Pm = 15,
TSC = 19, Ns = 16,
NCMContent = 20, BsdSockets = 17,
SM = 21, Htc = 18,
RO = 22, Tsc = 19,
GC = 23,
SDMMC = 24, // 20-29
OVLN = 25, Kvdb = 20,
SPL = 26, Sm = 21,
Ro = 22,
Gc = 23,
Sdmmc = 24,
Ovln = 25,
Spl = 26,
Socket = 27, Socket = 27,
HTCLOW = 29, Htclow = 29,
DDSF = 30,
HTCFS = 31, // 30-39
Ddsf = 30,
Htcfs = 31,
Async = 32, Async = 32,
Util = 33, Util = 33,
TIPC = 35, Tipc = 35,
ANIF = 37, Anif = 37,
ETHC = 100, Crt = 39,
I2C = 101,
GPIO = 102, // 100-109
UART = 103, Eth = 100,
CPAD = 104, I2c = 101,
Gpio = 102,
Uart = 103,
Cpad = 104,
Settings = 105, Settings = 105,
FTM = 106, Ftm = 106,
WLAN = 107, Wlan = 107,
XCD = 108, Xcd = 108,
TMP451 = 109, Tmp451 = 109,
NIFM = 110,
HwOpus = 111, // 110-119
LSM6DS3 = 112, Nifm = 110,
Codec = 111,
Lsm6ds3 = 112,
Bluetooth = 113, Bluetooth = 113,
VI = 114, Vi = 114,
NFP = 115, Nfp = 115,
Time = 116, Time = 116,
FGM = 117, Fgm = 117,
OE = 118, Oe = 118,
BH1730FVC = 119, Bh1730fvc = 119,
PCIe = 120,
// 120-129
Pcie = 120,
Friends = 121, Friends = 121,
BCAT = 122, Bcat = 122,
SSLSrv = 123, Ssl = 123,
Account = 124, Account = 124,
News = 125, News = 125,
Mii = 126, Mii = 126,
NFC = 127, Nfc = 127,
AM = 128, Am = 128,
PlayReport = 129, Prepo = 129,
AHID = 130,
Qlaunch = 132, // 130-139
PCV = 133, Ahid = 130,
USBPD = 134, Applet = 131,
BPC = 135, Ae = 132,
PSM = 136, Pcv = 133,
NIM = 137, UsbPd = 134,
PSC = 138, Bpc = 135,
TC = 139, Psm = 136,
USB = 140, Nim = 137,
NSD = 141, Psc = 138,
PCTL = 142, Tc = 139,
BTM = 143,
LA = 144, // 140-149
ETicket = 145, Usb = 140,
NGC = 146, Nsd = 141,
ERPT = 147, Pctl = 142,
APM = 148, Btm = 143,
CEC = 149, La = 144,
Es = 145,
Ngc = 146,
Erpt = 147,
Apm = 148,
Cec = 149,
// 150-159
Profiler = 150, Profiler = 150,
ErrorUpload = 151, Eupld = 151,
LIDBE = 152, Lidbe = 152,
Audio = 153, Audio = 153,
NPNS = 154, Npns = 154,
NPNSHTTPSTREAM = 155, Http = 155,
ARP = 157, Idle = 156,
SWKBD = 158, Arp = 157,
BOOT = 159, Updater = 158,
NetDiag = 160, Swkbd = 159,
NFCMifare = 161,
UserlandAssert = 162, // 160-169
Netdiag = 160,
NfcMifare = 161,
Err = 162,
Fatal = 163, Fatal = 163,
NIMShop = 164, Ec = 164,
SPSM = 165, Spsm = 165,
BGTC = 167, Aoc = 166,
UserlandCrash = 168, Bgtc = 167,
SASBUS = 169, Creport = 168,
PI = 170, Sasbus = 169,
AudioCtrl = 172,
LBL = 173, // 170-179
JIT = 175, Pl = 170,
HDCP = 176, Audioctrl = 172,
OMM = 177, Lbl = 173,
PDM = 178, Jit = 175,
OLSC = 179, Hdcp = 176,
SREPO = 180, Omm = 177,
Pdm = 178,
Olsc = 179,
// 180-189
Srepo = 180,
Dauth = 181, Dauth = 181,
STDFU = 182, Stdfu = 182,
DBG = 183, Dbg = 183,
DHCPS = 186, Dhcps = 186,
SPI = 187, Spi = 187,
AVM = 188, Avm = 188,
PWM = 189, Pwm = 189,
RTC = 191,
// 190-199
Rtc = 191,
Regulator = 192, Regulator = 192,
LED = 193, Led = 193,
SIO = 195, Sio = 195,
PCM = 196, Pcm = 196,
CLKRST = 197, Clkrst = 197,
POWCTL = 198, Powctl = 198,
// 200-209
AudioOld = 201, AudioOld = 201,
HID = 202, Hid = 202,
LDN = 203, Ldn = 203,
CS = 204, Cs = 204,
Irsensor = 205, Irsensor = 205,
Capture = 206, Capsrv = 206,
Manu = 208, Manu = 208,
ATK = 209, Atk = 209,
WEB = 210,
LCS = 211, // 210-219
GRC = 212, Web = 210,
Lcs = 211,
Grc = 212,
Repair = 213, Repair = 213,
Album = 214, Album = 214,
RID = 215, Rid = 215,
Migration = 216, Migration = 216,
MigrationLdcServ = 217, MigrationIdc = 217,
HIDBUS = 218, Hidbus = 218,
ENS = 219, Ens = 219,
WebSocket = 223,
DCDMTP = 227, // 220-229
PGL = 228, Websocket = 223,
Dcdmtp = 227,
Pgl = 228,
Notification = 229, Notification = 229,
INS = 230,
LP2P = 231, // 230-239
RCD = 232, Ins = 230,
LCM40607 = 233, Lp2p = 231,
PRC = 235, Rcd = 232,
TMAHTC = 237, Icm40607 = 233,
ECTX = 238, Prc = 235,
MNPP = 239, TmaHtc = 237,
HSHL = 240, Ectx = 238,
CAPMTP = 242, Mnpp = 239,
DP2HDMI = 244,
// 240-249
Hshl = 240,
Capmtp = 242,
Dp2hdmi = 244,
Cradle = 245, Cradle = 245,
SProfile = 246, Sprofile = 246,
NDRM = 250,
TSPM = 499, // 250-299
DevMenu = 500, Ndrm = 250,
Fst2 = 251,
Nex = 306,
// 300-399
Npln = 321,
LibNx = 345,
HomebrewAbi = 346,
HomebrewLoader = 347,
LibNxNvidia = 348,
LibNxBinder = 349,
// 400-499
Tspm = 499,
// 500-599
Devmenu = 500,
Nverpt = 520,
AmStuckMonitor = 521,
// 600-699
Pia = 618,
Eagle = 623,
// 800-899
GeneralWebApplet = 800, GeneralWebApplet = 800,
WifiWebAuthApplet = 809, WifiWebAuthApplet = 809,
WhitelistedApplet = 810, WhitelistedApplet = 810,
ShopN = 811, ShopN = 811,
Coral = 815,
}; };
/// Encapsulates a Horizon OS error code, allowing it to be separated into its constituent fields. /// Encapsulates a Horizon OS error code, allowing it to be separated into its constituent fields.