[TYPO3-mvc] Extbase and exceptions
Sebastian Schreiber
me at schreibersebastian.de
Thu Dec 8 11:07:17 CET 2016
how does your otherClass looks like?
Am 08.12.16 um 11:00 schrieb devweb:
> I have the same problem (typo3 6.2.29).
> If throw is in the same class than try{} catch{} then all works but if
> throw i s in an other class that's not work. typo3 show me the page
> with his message "Uncaught TYPO3 Exception"
> an exemple ;
>
> class Foo {
> protected function testException() {
> throw new \Exception('testException works?');
> }
>
> public function bar() {
> try {
> $this->testException();
> } catch (\Exception $ex) {
> echo($ex->getMessage()); // this is ok }
> $otherClass = new otherClass();
> try {
> $otherClass->testException();
> } catch (\Exception $ex) {
> echo($ex->getMessage()); // this is not ok, typo3 error
> handler stop before this...
> } }
> }
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
--
Sebastian Schreiber
(Medieninformatiker B.Sc.)
(TYPO3 Certified Integrator)
Paul Nießen Straße 58
D-50969 Köln
T 0221 677 88 541
M 0176 431 05 790
Skype schreibersebastian.de
me at schreibersebastian.de
www.schreibersebastian.de
Steuernummer: 219 / 5302 / 3123
More information about the TYPO3-project-typo3v4mvc
mailing list