Re: string_exec()
- Posted by mattlewis (admin) Mar 01, 2015
- 2370 views
I don't see why you'd want string_eval to throw an exception unless there was a mechanism to catch it with.
Even then, the exception would have happened within the context, not the caller.
The point of returning a result code is to interrogate the result of string_eval.
Why would you want string_eval throw a fatal exception in the calling routine? What's the benefit?
As I look at it, we're talking about calling some code. The only difference here is that the code wasn't parsed, etc, at the beginning. So the string_eval() call is just another part of the call stack, so (assuming exceptions have been implemented) an exception should bubble up to the caller like any other function call.
Unless we're talking about this as something sandboxed away from the current program. I don't think that's what Kat wants, since I believe she wants to interact with the data and code of the program that's executing the dynamic code.
Matt