1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-migrations.git synced 2024-07-02 22:55:03 +03:00
kohana-migrations/classes/minion/migration/exception.php
Matt Button e0fe87f443 Starting to refactor stuff.
Renaming locations -> groups
Cut down the size of fetch_required_migrations()
2011-02-17 20:43:04 +00:00

34 lines
715 B
PHP

<?php defined('SYSPATH') or die('No direct script access.');
/**
* Minion exception, thrown during a migration error
*/
class Minion_Migration_Exception extends Kohana_Exception {
protected $_migration = array();
/**
* Constructor
*
*/
public function __construct($message, array $migration, array $variables = array(), $code = 0)
{
$variables[':migration-id'] = $migration['id'];
$variables[':migration-group'] = $migration['group'];
$this->_migration = $migration;
parent::__construct($message, $variables, $code);
}
/**
* Get the migration that caused this exception to be thrown
*
* @return array
*/
public function get_migration()
{
return $this->_migration;
}
}