<?php
/**
* テーブルモデル例外
*
* PHP version 5
*
* @package    components.db
* @author     stk2k <stk2k@sazysoft.com>
* @copyright  2008 stk2k, sazysoft
*/

class TableModelException extends CharcoalException
{
	public function __construct( ITableModel $model, $field = NULL, $message = NULL )
	{
		$msg  = " [table model]" . get_class($model);
		if ( $field ){
			$msg .= " [field]$field";
		}
		if ( $message ){
			$msg .= " [message]$message";
		}

		parent::__construct( $msg );
	}

	/**
	 *   クラス名
	 */
	static function getClassName()
	{
		return __CLASS__;
	}
}
?>