예제 #1
0
 public function addException($error, $level = null)
 {
     $e = new Mage_Dataflow_Model_Convert_Exception($error);
     $e->setLevel(!is_null($level) ? $level : Mage_Dataflow_Model_Convert_Exception::NOTICE);
     $e->setContainer($this);
     $e->setPosition($this->getPosition());
     if ($this->getProfile()) {
         $this->getProfile()->addException($e);
     }
     return $e;
 }
예제 #2
0
 public function run()
 {
     //        print '<pre>';
     //        print_r($this->_dataflow_profile);
     //        print '</pre>';
     if (!$this->_actions) {
         $e = new Mage_Dataflow_Model_Convert_Exception("Could not find any actions for this profile");
         $e->setLevel(Mage_Dataflow_Model_Convert_Exception::FATAL);
         $this->addException($e);
         return;
     }
     foreach ($this->_actions as $action) {
         /* @var $action Mage_Dataflow_Model_Convert_Action */
         try {
             $action->run();
         } catch (Exception $e) {
             $dfe = new Mage_Dataflow_Model_Convert_Exception($e->getMessage());
             $dfe->setLevel(Mage_Dataflow_Model_Convert_Exception::FATAL);
             $this->addException($dfe);
             return;
         }
     }
     return $this;
 }
예제 #3
0
 public function run()
 {
     if (!$this->_actions) {
         $e = new Mage_Dataflow_Model_Convert_Exception("Could not find any actions for this profile");
         $e->setLevel(Mage_Dataflow_Model_Convert_Exception::FATAL);
         $this->addException($e);
         return;
     }
     foreach ($this->_actions as $action) {
         $action->run();
     }
     return $this;
 }