[nem-bug] [Nemerle 0000179]: when support in catch{} blocks
feedback at nemerle.org
feedback at nemerle.org
Mon Aug 14 21:56:59 CEST 2006
The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=179>
======================================================================
Reported By: malekith
Assigned To: nazgul
======================================================================
Project: Nemerle
Issue ID: 179
Category: Language Feature
Reproducibility: always
Severity: feature
Priority: normal
Status: resolved
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 06-21-2004 22:55 CEST
Last Modified: 08-14-2006 21:56 CEST
======================================================================
Summary: when support in catch{} blocks
Description:
try {...}
catch { e : MyException when e.value == 7 => .. }
It may be good idea, but it may be not. To be reconsidered.
======================================================================
----------------------------------------------------------------------
nazgul - 07-05-04 14:20
----------------------------------------------------------------------
I think it is a good idea, and it's consistent with matching. Just
imagine:
def checkedExc = ["System.IO.FileNotFoundException", ... ];
macro expose:
try { ... }
catch {
| e : System.Exception when checkedExc.Find (e.Name) =>
rethrow
/// in future
/// | e : System.ICheckedException
}
----------------------------------------------------------------------
malekith - 04-25-05 22:21
----------------------------------------------------------------------
I think this is related to allowing:
catch {
| _ is Ex1
| _ is Ex2 => ...
}
which could be translated to
catch {
| e when e is Ex1 || e is Ex2 => ...
}
BUT, as stated by Kamil on IRC, there is an easy implementation possible
here:
catch {
| e =>
match (e) {
whatever, with |-patterns and when
| _ => throw;
}
}
----------------------------------------------------------------------
nazgul - 08-14-06 21:56
----------------------------------------------------------------------
Huh, this was implemented by Snaury in the try/catch refactoring :)
Issue History
Date Modified Username Field Change
======================================================================
06-21-04 22:55 malekith New Issue
07-05-04 14:20 nazgul Note Added: 0000185
07-05-04 14:20 nazgul Status new => confirmed
04-25-05 22:21 malekith Note Added: 0000724
04-25-05 22:21 malekith Priority low => normal
04-25-05 22:21 malekith Description Updated
08-27-05 13:49 malekith Category The Language => Language
Feature
08-27-05 13:49 malekith Description Updated
08-14-06 21:56 nazgul Status confirmed => resolved
08-14-06 21:56 nazgul Resolution open => fixed
08-14-06 21:56 nazgul Assigned To => nazgul
08-14-06 21:56 nazgul Note Added: 0001418
======================================================================
More information about the bugs
mailing list