catch (MigrateException $e) {
        $this->map->saveIDMapping($this->sourceValues, array(),
          $e->getStatus(), $this->rollbackAction, $data_row->migrate_map_hash);
        $this->saveMessage($e->getMessage(), $e->getLevel());
        self::displayMessage($e->getMessage());
      }
      catch (Exception $e) {
        $this->map->saveIDMapping($this->sourceValues, array(),
          MigrateMap::STATUS_FAILED, $this->rollbackAction,
          $data_row->migrate_map_hash);
        $this->handleException($e);
      }

I don't know whether I should throw a MigrateException or an Exception, or whether it depends on the kind of problem. These catch blocks need some comments to explain what they are doing and what sort of problem they expect to be handling.

Comments

pifagor’s picture

Status: Active » Closed (outdated)