EMILUA(3em)
π emilua(3em) β the Emilua reference, bestie edition
okay so real talk: this page is about Emilua, the Lua execution engine, and specifically about its little generic-error situation. the manual name is Emilua reference if you were wondering, and yes we're gonna get through all of it. grab a snack. π
β¨ NAME β¨
Emilua β it's a Lua execution engine, periodt. π
πΈ DESCRIPTION πΈ
so here's the vibe. you require the generic_error module, you grab an error code off it, you decorate it with whatever extra fields your heart desires, and then you yeet it with error(). like this:
local generic_error = require 'generic_error'
local my_error = generic_error.EINVAL
my_error.arg = 1
error(my_error)
that's it, that's the whole flow. π«Ά
now for the technical bit β and this is the part you actually need to remember: it's a userdata where the __index() metamethod hands you back a new error code from the generic category every time you access it. not the same one. a fresh one. every access. no cap. π
π₯ ERROR LIST π₯
okay bestie, here comes the whole roster β every single one of these bad boys lives in the generic category. the way that there are this many of them?? iconic honestly. don't skip any, they all matter π
EAFNOSUPPORTEADDRINUSEEADDRNOTAVAILEISCONNE2BIGEDOMEFAULTEBADFEBADMSGEPIPEECONNABORTEDEALREADYECONNREFUSEDECONNRESETEXDEVEDESTADDRREQEBUSYENOTEMPTYENOEXECEEXISTEFBIGENAMETOOLONGENOSYSEHOSTUNREACHEIDRMEILSEQENOTTYEINTREINVALESPIPEEIOEISDIREMSGSIZEENETDOWNENETRESETENETUNREACHENOBUFSECHILDENOLINKENOLCKENOMSGENOPROTOOPTENOSPCENXIOENODEVENOENTESRCHENOTDIRENOTSOCKENOTCONNENOMEMENOTSUPECANCELEDEINPROGRESSEPERMEOPNOTSUPPEWOULDBLOCKEOWNERDEADEACCESEPROTOEPROTONOSUPPORTEROFSEDEADLKEAGAINERANGEENOTRECOVERABLEETXTBSYETIMEDOUTENFILEEMFILEEMLINKELOOPEOVERFLOWEPROTOTYPE
that's the whole page, you made it, I'm so proud of you π§π
little sign-off cuteness β this is Emilua 0.12.1-nixpkgs1, dated 1980-01-01, and it belongs to the EMILUA(3em) corner of the world. go forth and error-handle slayfully. πβ¨
π¦ where this page comes from
- nixos 26.05: emilua 0.12.1
- nixpkgs unstable: emilua 0.12.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms