When native error types are opaque or difficult to construct, application code becomes hard to test. Divide the application into error domains so each isolated part has a predefined error-handling mechanism and no competing error behavior. section 13.1.2
An error domain does not necessarily match one architectural layer: several layers may share a domain, and one layer may contain several domains. At every boundary, convert artifacts from one error representation into another. section 13.1.2 section 13.3
Native library boundary
A free-monadic application should not allow native errors or exceptions to leak into its pure language and scenarios. Let an interpreter mediate the boundary by converting native failures into an abstract representation; the interpreter may keep its own internal errors. section 13.1.2
Figure 13.2 Error domains
Use the error-domain diagram to trace how distinct error mechanisms are separated and where conversions occur. section 13.1.2
