0

In a project where I use twig template engine, I use my own try/catch blocks for error handling. This works quite reliable so far.

However, twig also has its own exception handling. Every exception thrown in the software and handled by my catch is also handled again by the catch of twig.

Is there a possibility to empty the exception stack in my try/catch block, so that twig doesn't handle the exception, too?

I want something like this:

    try {
        sillyFunctionThrowingException();
    }
    catch(Exception $e) {
        //handle exception
       removeHandledException();
    }

Is this possible?

Marco
  • 3,470
  • 4
  • 23
  • 35

0 Answers0