Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Zephir the try catch use ParseException: Syntax error

try {
    echo hello;
} catch \Exception e {
    echo e->getMessage();
}

Zephir\ParseException: Syntax error in /alidata/www/mybetdata/mybetdata/data.zep on line 10

             } catch \Exception e {
        ------------------------^


81.8k
Accepted
answer
edited Sep '14

Currently, that syntax is not supported, the right syntax is:

try {
    echo hello;
} catch \Exception, e {
    echo e->getMessage();
}

https://github.com/phalcon/zephir/blob/master/test/trytest.zep#L84

Thank you for