Hi! > Basically the method allows you to do delegate error handling to the > coroutine, rather than doing it yourself (as you are not always able to do > it). It is particularly useful in more complicated settings, e.g. if you > are doing task scheduling through coroutines. For a small sample of how
Could you expand on this point a bit more? It sounds like using exceptions for flow control, which is usually a very bad idea. > this looks like see http://taskjs.org/. What the ->throw() method would do > in these examples is that it allows to check for errors by try/catching the > yield statement (rather than going for some odd solution with error > callbacks). Could you point to some specific example? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php