Skip to content

Document the behavior of try and $! if no Exception is thrown #4700

@schultzdavid

Description

@schultzdavid

The page on exceptions and the section on the try statement modifier currently don't say what happens when everything goes fine and no Exception is thrown/caught. The only thing in that direction is the general statement

Caught exceptions are stored inside the $! variable, which holds a value of type Exception.

The docs should say explicitly what to expect for the value of $! if no Exception is thrown.

De facto it's (Any):

> try { }; say $!
(Any)

I'm not sure though it's specced that way, or if this value is more an accidental feature of the Rakudo implementation.

Metadata

Metadata

Assignees

Labels

docsDocumentation issue (primary issue type)

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions