Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote:
Yes, it only handles Errors and arrays.
But anything can be thrown with throws. So the method handles just 2 possibilities of a wide range. Not even considering custom classes and array (formats/'buildups')
But you are suggesting that it should only handle Errors?
Yes, so there's no need for a master->describe_error. No need to distinct between Error and array and possibly anything else that is returned as an error related object.
Not much of an improvement.
Problem is; anything can theoretically be thrown. You have to take this in account when handling an error related object. It's not always an Error or array. If it were always an error, you can allways handle it the same way and possibly in a later stadium differ between kinds/types of error classes thrown.
Instant access to error message: ((array)e)[0] Instant access to backtrace: ((array)e)[1]
But yes, it would be nice if more builtin errors were objects instead of arrays.
That's exactly what I mean :) Always return an Error object which has something like the following members:
string message array(string) stacktrace or even array(Trace) stacktrace (Trace containing path/obj/linenumber/ident/whatever) mixed additionalSomething
Coen
__________________________________________________________ Deze e-mail en de inhoud is vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n). Indien u niet de geadresseerde bent van deze e-mail verzoeken wij u dit direct door te geven aan de verzender door middel van een reply e-mail en de ontvangen e-mail uit uw systemen te verwijderen. Als u geen geadresseerde bent, is het niet toegestaan om kennis te nemen van de inhoud, deze te kopieren, te verspreiden, bekend te maken aan derden noch anderszins te gebruiken.
The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Please notify us immediately if you have received it in error by reply e-mail and then delete this message from your system. __________________________________________________________