module Ameba::Ext::Rescue

Overview

Extensions to Crystal::Rescue

Direct including types

Defined in:

ameba/ext/rescue.cr

Instance Method Summary

Instance Method Detail

def end_location : Crystal::Location | Nil #

Returns the end location of the rescue clause header, being the end of the exception types (rescue ex : Exception), the variable name (rescue ex), or the keyword itself (rescue), instead of the end of the clause body.


[View source]
def name_location : Crystal::Location | Nil #

Returns the location of the variable name in case of a named rescue (i.e. ex in rescue ex), or nil otherwise.


[View source]