1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-migrations.git synced 2024-06-30 21:55:05 +03:00
kohana-migrations/classes/Minion/Migration/Exception.php
Evan Purkhiser bc28977d65 Cleanup coding style to conform to Kohana CS
- Added variable names to just about all @param tags
 - Ensured proper alignment in doc block comments
 - Ensured proper file spacing and trimmed all trailing whitespace
 - Corrected improper languge construct formats (eg if () not if())
 - Corrected some assignment operator alignment
 - A few spelling corrections
 - All classes pass `phpcs --Standard=Kohana` (asside from tests)
2012-10-24 04:08:09 -04:00

34 lines
712 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;
}
}