#1562: Doctrine_Table::__call throws "Unknown method" exception if exception
occurs in template TableProxy method
-----------------------------------+----------------------------------------
Reporter: drm | Owner: jwage
Type: defect | Status: new
Priority: minor | Milestone: Unknown
Component: Behaviors | Version: 1.0.3
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 0
-----------------------------------+----------------------------------------
In `Doctrine_Table::__call()`, lazy exception catching is done, assuming
any exception occurring is an exception regarding existence of the proxy
method in any of the Records' templates.
If any other exception occurs in the proxy method, you will still get the
error "Unknown method ...etc"
Imho the try/catch block can be removed completely, since
`Doctrine_Record::__call()` will throw the same exception, though stating
another context. Actually, to make it all the more better,
`Doctrine_Record::__call()` should throw a `BadMethodCallException` if the
method call is invalid, so you can catch that exception in
`Doctrine_Table::__call()` and throw a new `BadMethodCallException`
stating the `Doctrine_Table::__call()` context (in stead of
`Doctrine_Record::__call()`, which is probably why this is built this way
in the first place). All other exceptions will be left alone then.
HTH :)
--
Ticket URL: <http://trac.phpdoctrine.org/ticket/1562>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---