- $tplEngine = ObjectFactory::createObjectByConfiguredName('tpl_engine', array(FrameworkConfiguration::getInstance()->readConfig('tpl_base_path'), $lang, $io));
- } catch (BasePathIsEmptyException $e) {
- die(sprintf("[Main:] Could not initialize template engine for this reason: <strong>%s</strong>",
- $e->getMessage()
- ));
- } catch (InvalidBasePathStringException $e) {
- die(sprintf("[Main:] Could not initialize template engine for this reason: <strong>%s</strong>",
- $e->getMessage()
- ));
- } catch (BasePathIsNoDirectoryException $e) {
- die(sprintf("[Main:] Could not initialize template engine for this reason: <strong>%s</strong>",
- $e->getMessage()
- ));
- } catch (BasePathReadProtectedException $e) {
- die(sprintf("[Main:] Could not initialize template engine for this reason: <strong>%s</strong>",
+ $templateInstance = ObjectFactory::createObjectByName($tpl, array(ApplicationHelper::getInstance()));
+ } catch (FrameworkException $e) {
+ die(sprintf("[Main:] Could not initialize template engine for reason: <span class=\"exception_reason\">%s</span>",