<?php
/**
* 不正なDBリレーション例外
*
* PHP version 5
*
* @package    exceptions
* @author     stk2k <stk2k@sazysoft.com>
* @copyright  2008 stk2k, sazysoft
*/

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

		parent::__construct( $msg );
	}

}
