1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-migrations.git synced 2024-06-26 03:40:54 +03:00
kohana-migrations/classes/Minion/Migration/Exception.php
2012-10-23 23:06:52 -07: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;
}
}