<?php
/**
 * This file is part of the set of the DDR Simple API definition. It contains the
 * definition of the {@link ValueException} class.
 * 
 * @author Sylvain Lequeux
 * @author Francois Daoust <fd@w3.org>
 * @package AskPythia
 * @subpackage Interface
 * @version $Revision: 1.8 $
 * @license http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231.html W3C Software Notice and License
 * @copyright Copyright (c) 2009, W3C (MIT, ERCIM, Keio)
 */

/**
 * Include the base {@link DDRException} class description.
 */
require_once(dirname(__FILE__).'/ddrException.php');

/**
 * {@link http://www.w3.org/TR/DDR-Simple-API/#sec-ValueException ValueException}
 * class as defined in the {@link http://www.w3.org/TR/DDR-Simple-API/
 * DDR Simple API} standard.
 * 
 * This exception should be thrown when an error is detected during an attempt
 * to retrieve the value of a property using one of the value accessor methods
 * of the {@link PropertyValue} class. The exception code indicates the nature
 * of the error. 
 *
 * The exception should be thrown using the constructor of the base Exception
 * class: throw new ValueException([$message  [, $code  [, $previous ]]]).
 * 
 * @author Sylvain Lequeux
 * @author Francois Daoust <fd@w3.org>
 * @package AskPythia
 * @subpackage Interface
 * @link http://www.w3.org/TR/DDR-Simple-API/ Device Description Repository Simple API
 * @version $Revision: 1.8 $
 * @license http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231.html W3C Software Notice and License
 * @copyright Copyright (c) 2009, W3C (MIT, ERCIM, Keio)
 */
class ValueException extends DDRException {
	/**
	 * @var int The property value is unknown.
	 */
	static public $NOT_KNOWN = 900;
	/**
	 * @var int The value represented by the PropertyValue is incompatible
	 *          with the return type of the method used to retrieve it.
	 */
	static public $INCOMPATIBLE_TYPES = 600;
	/**
	 * @var int The implementation is aware of multiple values for this Property.
	 */
	static public $MULTIPLE_VALUES = 10000;
}