Added an "Uncaught Exception" logic to the service engine and a unit test for it.