EMILUA(3em)

πŸ“¦ version 0.12.1, in nixos 26.05, nixpkgs unstable

πŸ’… 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 πŸ‘‡

  • EAFNOSUPPORT
  • EADDRINUSE
  • EADDRNOTAVAIL
  • EISCONN
  • E2BIG
  • EDOM
  • EFAULT
  • EBADF
  • EBADMSG
  • EPIPE
  • ECONNABORTED
  • EALREADY
  • ECONNREFUSED
  • ECONNRESET
  • EXDEV
  • EDESTADDRREQ
  • EBUSY
  • ENOTEMPTY
  • ENOEXEC
  • EEXIST
  • EFBIG
  • ENAMETOOLONG
  • ENOSYS
  • EHOSTUNREACH
  • EIDRM
  • EILSEQ
  • ENOTTY
  • EINTR
  • EINVAL
  • ESPIPE
  • EIO
  • EISDIR
  • EMSGSIZE
  • ENETDOWN
  • ENETRESET
  • ENETUNREACH
  • ENOBUFS
  • ECHILD
  • ENOLINK
  • ENOLCK
  • ENOMSG
  • ENOPROTOOPT
  • ENOSPC
  • ENXIO
  • ENODEV
  • ENOENT
  • ESRCH
  • ENOTDIR
  • ENOTSOCK
  • ENOTCONN
  • ENOMEM
  • ENOTSUP
  • ECANCELED
  • EINPROGRESS
  • EPERM
  • EOPNOTSUPP
  • EWOULDBLOCK
  • EOWNERDEAD
  • EACCES
  • EPROTO
  • EPROTONOSUPPORT
  • EROFS
  • EDEADLK
  • EAGAIN
  • ERANGE
  • ENOTRECOVERABLE
  • ETXTBSY
  • ETIMEDOUT
  • ENFILE
  • EMFILE
  • EMLINK
  • ELOOP
  • EOVERFLOW
  • EPROTOTYPE

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