net.sf.jmatchparser.util
Class ExpectException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.sf.jmatchparser.util.ExpectException
- All Implemented Interfaces:
- Serializable
public class ExpectException
- extends RuntimeException
This exception is thrown when an expectation fails. It tries to show useful
information (like actual and expected values) in its message.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
ExpectException
public ExpectException(String actual,
String expected)
- Create a new Expect exception
- Parameters:
actual
- Actual valueexpected
- Expected value
fromRegex
public static ExpectException fromRegex(String actual,
Pattern pattern)
- Create a new expect exception from a regular expression.
- Parameters:
actual
- Actual valuepattern
- Pattern that should match
Copyright © 2011. All Rights Reserved.