Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-3011

Extend error handling in xlf parser

    XMLWordPrintable

Details

    • High
    • Error handling code improvement for xlf parser.

    Description

      Problem

      While the parsing of the trans unit source and target segments and saving the segments to the database, the exception handing can fail because of different type of exception is thrown during that process. This can leadsto an error in the error handling process making the original error to be lost.

      Stack trace

      error
      E9999
      Error: Call to undefined method Zend_Db_Statement_Exception::setMessage()
      core
      File: /webs/instance-1011/application/modules/editor/Models/Import/FileParser/Xlf.php (551)
      
      Request: personal-demo.translate5.net PUT /editor/worker/1691
      
      Trace:
      
          #0 /webs/instance-1011/application/modules/editor/Models/Import/FileParser/XmlParser.php(685): editor_Models_Import_FileParser_Xlf->{closure}()
          #1 /webs/instance-1011/application/modules/editor/Models/Import/FileParser/XmlParser.php(185): editor_Models_Import_FileParser_XmlParser->handleElementEnd()
          #2 /webs/instance-1011/application/modules/editor/Models/Import/FileParser/XmlParser.php(158): editor_Models_Import_FileParser_XmlParser->parseList()
          #3 /webs/instance-1011/application/modules/editor/Models/Import/FileParser/Xlf.php(231): editor_Models_Import_FileParser_XmlParser->parse()
          #4 /webs/instance-1011/application/modules/editor/Models/Import/FileParser.php(259): editor_Models_Import_FileParser_Xlf->parse()
          #5 /webs/instance-1011/application/modules/editor/Models/Import/Worker/Import.php(147): editor_Models_Import_FileParser->parseFile()
          #6 /webs/instance-1011/application/modules/editor/Models/Import/Worker/Import.php(97): editor_Models_Import_Worker_Import->importFiles()
          #7 /webs/instance-1011/application/modules/editor/Models/Import/Worker.php(76): editor_Models_Import_Worker_Import->import()
          #8 /webs/instance-1011/library/ZfExtended/Worker/Abstract.php(488): editor_Models_Import_Worker->work()
          #9 /webs/instance-1011/library/ZfExtended/Worker/Abstract.php(432): ZfExtended_Worker_Abstract->_run()
          #10 /webs/instance-1011/library/ZfExtended/Controllers/WorkerController.php(123): ZfExtended_Worker_Abstract->runQueued()
          #11 /webs/instance-1011/application/modules/editor/Controllers/WorkerController.php(37): ZfExtended_WorkerController->putAction()
          #12 /webs/shared-translate5-instance-files/vendor-5.7.5/shardj/zf1-future/library/Zend/Controller/Action.php(516): editor_WorkerController->putAction()
          #13 /webs/instance-1011/library/ZfExtended/Controllers/AAARestController.php(315): Zend_Controller_Action->dispatch()
          #14 /webs/shared-translate5-instance-files/vendor-5.7.5/shardj/zf1-future/library/Zend/Controller/Dispatcher/Standard.php(308): ZfExtended_RestController->dispatch()
          #15 /webs/shared-translate5-instance-files/vendor-5.7.5/shardj/zf1-future/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch()
          #16 /webs/shared-translate5-instance-files/vendor-5.7.5/shardj/zf1-future/library/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
          #17 /webs/shared-translate5-instance-files/vendor-5.7.5/shardj/zf1-future/library/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
          #18 /webs/instance-1011/library/ZfExtended/Application.php(47): Zend_Application->run()
          #19 /webs/instance-1011/library/ZfExtended/BaseIndex.php(151): ZfExtended_Application->run()
          #20 /webs/instance-1011/public/index.php(35): ZfExtended_BaseIndex->startApplication()
          #21 {main}
      

      Attachments

        Activity

          People

            aleksandar Aleksandar Mitrev
            aleksandar Aleksandar Mitrev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: