class Savi::Error

Overview

This exception class is used to represent errors to be presented to the user, with each error being associated to a particular SourcePos that caused it.

Defined in:

savi/error.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.build(pos : Source::Pos, msg : String) : Error #

[View source]
def self.build(any, msg : String) : Error #

Build an error for the given source position, with the given message.


[View source]
def self.new(pos : Savi::Source::Pos, headline : String) #

[View source]

Class Method Detail

def self.at(*args) #

Raise an error built with the given information.


[View source]
def self.build(pos : Source::Pos, msg : String, info, fix_edits = nil) #

[View source]
def self.build(any, msg : String, info, fix_edits = nil) #

Raise an error for the given source position, with the given message, along with extra details taken from the following array of tuples.


[View source]
def self.compiler_hole_at(pos, cause : Exception) #

[View source]

Instance Method Detail

def ==(other : Error) #

[View source]
def fix_edits : Array({Savi::Source::Pos, String}) #

[View source]
def headline : String #

[View source]
def info : Array({Savi::Source::Pos, String}) #

[View source]
def message(show_compiler_hole_details = false) #

[View source]
def pos : Source::Pos #

[View source]
def to_lsp_diagnostic #

[View source]