def AcpiShow.error

bend-osdev-acpi@0.1.1.0 · show.bend:39

import bend-osdev-acpi@0.1.1.0/show.bend as Show
import Base
import bend-osdev-acpi@0.1.1.0/error.bend as E

39def AcpiShow.error(e: E.AcpiError) -> String:
40  match e:
41    case E.AcpiTooShort{n, g}:
42      "TooShort " ++ sh.n(n) ++ " " ++ sh.n(g)
43    case E.AcpiBadSignature{s}:
44      "BadSignature " ++ sh.x(s)
45    case E.AcpiBadLength{l}:
46      "BadLength " ++ sh.u(l)
47    case E.AcpiBadChecksum{s}:
48      "BadChecksum " ++ sh.u(s)
49    case E.AcpiRsdpBadChecksum{s}:
50      "RsdpBadChecksum " ++ sh.u(s)
51    case E.AcpiRsdpBadExtChecksum{s}:
52      "RsdpBadExtChecksum " ++ sh.u(s)
53    case E.AcpiBadRevision{r}:
54      "BadRevision " ++ sh.u(r)
55    case E.AcpiBadEntry{o, k}:
56      "BadEntry " ++ sh.n(o) ++ " " ++ sh.u(k)
57    case E.AcpiBadSize{n}:
58      "BadSize " ++ sh.n(n)
59    case E.AcpiNotMapped{a}:
60      "NotMapped " ++ sh.w(a)
61    case E.AcpiTableMissing{s}:
62      "TableMissing " ++ sh.x(s)
63    case E.AcpiAmlTruncated{}:
64      "AmlTruncated"
65    case E.AcpiAmlBadOpcode{c}:
66      "AmlBadOpcode " ++ sh.u(c)
67    case E.AcpiAmlBadPkgLength{}:
68      "AmlBadPkgLength"
69    case E.AcpiAmlBadName{}:
70      "AmlBadName"
71    case E.AcpiAmlUndefined{p}:
72      "AmlUndefined " ++ p
73    case E.AcpiAmlDuplicate{p}:
74      "AmlDuplicate " ++ p
75    case E.AcpiAmlBadOperand{c}:
76      "AmlBadOperand " ++ sh.u(c)
77    case E.AcpiAmlBadType{s}:
78      "AmlBadType"
79    case E.AcpiAmlRange{}:
80      "AmlRange"
81    case E.AcpiAmlDivZero{}:
82      "AmlDivZero"
83    case E.AcpiAmlBadControl{}:
84      "AmlBadControl"
85    case E.AcpiAmlFatal{t, c, a}:
86      "AmlFatal " ++ sh.u(t) ++ " " ++ sh.u(c) ++ " " ++ sh.w(a)
87    case E.AcpiAmlUnsupported{s}:
88      "AmlUnsupported " ++ s
89    case E.AcpiAmlStepLimit{}:
90      "AmlStepLimit"
91    case E.AcpiAmlHost{c}:
92      "AmlHost " ++ sh.u(c)

Uses (7)

Used by (1)