/*
 * This file is covered by the terms of the Common Public License v1.0.
 *
 * Copyright (c) SZEDER Gábor
 *
 * Parts of this software were developed within the JEOPARD research
 * project, which received funding from the European Union's Seventh
 * Framework Programme under grant agreement No. 216682.
 */

package de.fzi.cjunit;

import static de.fzi.cjunit.internal.util.LineSeparator.lineSeparator;

import gov.nasa.jpf.Property;


/**
 * This exception is thrown when a property is violated while the test is run
 * under Java PathFinder.
 */
public class JPFPropertyViolated extends Error {

	private static final long serialVersionUID = 1L;

	private Property violatedProperty;

	/**
	 * @param violatedProperty	the property which was violated during
	 *				the test run
	 */
	public JPFPropertyViolated(Property violatedProperty) {
		super(new String("Property '"
				+ violatedProperty.getClass().getName()
				+ "' violated" + lineSeparator
				+ violatedProperty.getErrorMessage()));
		this.violatedProperty = violatedProperty;
	}

	/**
	 * @return	the property which was violated during the test run
	 */
	public Property getViolatedProperty() {
		return violatedProperty;
	}
}

@@ -468,82 +468,327 @@
 own 
-when a property is violated while the test is run%0A * under Java PathFinder
+to indicate the violation of an user-supplied%0A * property.  The exception's message contains the name of the violated%0A * property class and the property's error message.%0A * %3Cp%3E%0A * Note: The violation of %3Ccode%3ENotDeadLockedProperty%3C/code%3E is not reported%0A * through this exception, but through %3Ccode%3EDeadlockError%3C/code%3E
 .%0A *

Update JavaDoc of the JPFPropertyViolated exception class