On Fri, Jun 01, 2007 at 06:40:01PM +0000, Henrik Grubbstr�m (Lysator) @ Pike (-) developers forum wrote:
Mast's suggested syntax: try_statement: TOK_TRY block catch_list ; catch_list: catch_statement | catch_list catch_statement ; catch_statement: TOK_CATCH ( type optional_identifier ) block_or_semi ; Is easy to generate code for:
nice!
I don't however see any immediate need for the syntax in the complex case: try { ... } catch (object err; err->is_my_error && err->failure_pos > 4711) { ... }
class ComplexError { int is_my_error = 1; int(4711..) failure_pos; }
try { ... } catch (ComplexError) { .. }
ok, it's a bit more expensive but this should work, shouldn't it?
greetings, martin.