diff options
| author | Tristan Zur <tzur@webserver.ccwn.org> | 2015-06-10 20:55:53 +0200 |
|---|---|---|
| committer | Tristan Zur <tzur@webserver.ccwn.org> | 2015-06-10 20:55:53 +0200 |
| commit | 406abd7c4df1ace2cd3e4e17159e8941a2e8c0c4 (patch) | |
| tree | a324be16021f44f2fd6d55e609f47024e945b1db /system/libraries/ORM_Validation_Exception.php | |
Initial import
Diffstat (limited to 'system/libraries/ORM_Validation_Exception.php')
| -rw-r--r-- | system/libraries/ORM_Validation_Exception.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/system/libraries/ORM_Validation_Exception.php b/system/libraries/ORM_Validation_Exception.php new file mode 100644 index 0000000..9044aa6 --- /dev/null +++ b/system/libraries/ORM_Validation_Exception.php @@ -0,0 +1,24 @@ +<?php defined('SYSPATH') or die('No direct script access.'); +/** + * ORM Validation exceptions. + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2008-2009 Kohana Team + * @license http://kohanaphp.com/license + */ +class ORM_Validation_Exception_Core extends Database_Exception { + + /** + * Handles Database Validation Exceptions + * + * @param Validation $array + * @return + */ + public static function handle_validation($table, Validation $array) + { + $exception = new ORM_Validation_Exception('ORM Validation has failed for :table model',array(':table'=>$table)); + $exception->validation = $array; + throw $exception; + } +} // End ORM_Validation_Exception
\ No newline at end of file |
