class Savi::Error
- Savi::Error
- Exception
- Reference
- Object
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.crConstructors
- .build(pos : Source::Pos, msg : String) : Error
-
.build(any, msg : String) : Error
Build an error for the given source position, with the given message.
- .new(pos : Savi::Source::Pos, headline : String)
Class Method Summary
-
.at(*args)
Raise an error built with the given information.
- .build(pos : Source::Pos, msg : String, info, fix_edits = nil)
-
.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.
- .compiler_hole_at(pos, cause : Exception)
Instance Method Summary
- #==(other : Error)
- #fix_edits : Array({Savi::Source::Pos, String})
- #headline : String
- #info : Array({Savi::Source::Pos, String})
- #message(show_compiler_hole_details = false)
- #pos : Source::Pos
- #to_lsp_diagnostic
Constructor Detail
Build an error for the given source position, with the given message.
Class Method Detail
Raise an error for the given source position, with the given message, along with extra details taken from the following array of tuples.