sdml_error 0.1.0

Simple Domain Modeling Language (SDML) errors and diagnostics.
docs.rs failed to build sdml_error-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

Crate sdlm_error

Rust Library containing the error and diagnostic types for the Simple Domain Modeling Language (SDML).

crates.io docs.rs

This package is part of the Rust SDML project and specifically defines the error and diagnostic types for the project. The project's intent is to provide an idiomatic implementation of the in-memory model, parser, generators, and the CLI tool.

The following figure demonstrates this package in the broader project context.

                            ╭───────╮
                            │  CLI  │
                       ╔══  │ crate │  ══╗
                       ║    ╰───────╯    ║
┌╌╌╌╌╌╌╌╌┐             V                 V
┆        ┆       ╭──────────╮       ╭──────────╮       Formatted Source
┆ source ┆  ══>  │  parse   │  ══>  │ generate │  ══>  RDF Representation 
┆  file  ┆    ╭──│  crate   │───────│   crate  │──╮    Documentation
┆        ┆    │  ╰──────────╯       ╰──────────╯  │    Diagrams
└╌╌╌╌╌╌╌╌┘    │             core crate            │──╮
              ╰───────────────────────────────────╯  │
 ┌───────┐             ⋀          error crate        │
 │ other │             ║  ╌╌╌╌╌╌╌╌╌╌╌╌╌╌─────────────╯
 │ tools │  ═══════════╝
 └───────┘

Changes

Version 0.1.0

Initial Release.

  • Error Handling:
    • Copy error module from sdml_core, rename as errors.
    • Remove diagnostics from the existing Error type.
  • Diagnostics:
    • Copy diagnostics module.
    • Create new diagnostics::codes module and ErrorCode enum.
    • Create new diagnostics::functions module and functions for each ErrorCode.
  • Diagnostic Reporting:
    • Create new diagnostics::reporter module.
    • Create new Reporter trait.
    • Create a StandardStreamReporter to emit colored and structured errors to the console.
    • Create a BailoutReporter that will turn the first diagnostic it is given into an error.