Wiki

Ticket #86 (new enhancement)

Opened 3 years ago

Last modified 3 years ago

Add "catch" for any expression

Reported by: Chuck Owned by:
Priority: minor Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Description

x = int.parse(input) catch FormatError get 0

See full discussion at  Shortcut syntax idea for catch.

Change History

Changed 3 years ago by Chuck

Per the discussion, the syntax should start with the try keyword:

x = try int.parse(input) catch FormatError get 0

Also, there are implementation hints in the discussion.

Changed 3 years ago by Chuck

  • type changed from defect to enhancement

Changing from defect to enhancement.

Note: See TracTickets for help on using tickets.