def test_error(self):

        class FakeService(service.Service):

            def startService(self):
                raise RuntimeError("Something is wrong")

        errorService = FakeService()
        errorService.setServiceParent(self.runner.application)

        with AlternateReactor(FakeDaemonizingReactor()):
            self.assertRaises(RuntimeError, self.runner.postApplication)
        self.assertEqual(
            self.mockos.actions,
            [('chdir', '.'), ('umask', 0o077), ('fork', True), 'setsid',
             ('fork', True), ('write', -2, '1 Something is wrong'),
             ('unlink', 'twistd.pid')])
        self.assertEqual(self.mockos.closed, [-3, -2])
Retrieves all fields marked as shared for this org tree.
dataset/ETHPy150Open twisted/twisted/twisted/test/test_twistd.py/DaemonizeTests.test_error--crossover with--dataset/ETHPy150Open buildingenergy/buildingenergy-platform/seed/views/accounts.py/get_shared_fields