class Mint::Error

Overview

Represents a raisable rich and descriptive error. The error can be built using a DLS.

Defined in:

errorable.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : Symbol) #

[View source]

Instance Method Detail

def block(&) #

[View source]
def block(contents : String) #

[View source]

The message is based on blocks of elements. The blocks are separated by double new lines.


[View source]
def bold(value : String) #

[View source]
def code(value : String) #

[View source]
def expected(subject : String, got : String) #

[View source]
def expected(subject : TypeChecker::Checkable | String, got : TypeChecker::Checkable) #

[View source]
def name : Symbol #

The name of the error.


[View source]
def snippet(value : String, node : SnippetTarget) #

[View source]
def snippet(value : SnippetTarget) #

[View source]
def text(value : String) #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def to_terminal #

[View source]