CommBus.Template.RenderError exception (CommBus v0.1.0)

Copy Markdown View Source

Exception raised or returned when a template render fails. Carries the failure :type (e.g. :render_failed, :type_coercion_failed, :max_depth_exceeded), a human-readable :message, and optional :template_name and :variable_name for diagnostics.

Summary

Functions

Returns the human-readable error message string.

Types

t()

@type t() :: %CommBus.Template.RenderError{
  __exception__: true,
  message: String.t(),
  template_name: String.t() | nil,
  type: atom(),
  variable_name: String.t() | nil
}

Functions

message(exception)

@spec message(t()) :: String.t()

Returns the human-readable error message string.

Parameters

  • error — A %CommBus.Template.RenderError{} struct.

Returns

The error message as a String.t().