class

Pegasus::Error::PegasusException

Inherits Exception / Reference / Object

An exception thrown by Pegasus. Unlike Crystal exceptions, which will be reported directly to the user without any prettyfication, the Pegasus exception is created to display the error information to the user in a clear and pretty way. This includes coloring and emphasizing certain sections of the message, and generally presenting them in a user-friendly way.

Constructors

new(description : String, context_data : Array(Pegasus::Error::ErrorContext) = [] of ErrorContext, internal : Bool = false)
Source

Instance methods

context_data
Source
get_location_name

Get the "location" of the error, which is used to report to the user when in the process the error occured.

Source