|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.hammingweight.hammock.HammockException
public class HammockException
The HammockException class encapsulates various exceptions that may be thrown by test doubles.
Constructor Summary | |
---|---|
HammockException(java.lang.Class throwingClass,
java.lang.String errorMessage)
A constructor. |
|
HammockException(MockMethod method,
java.lang.String errorMessage)
A constructor. |
|
HammockException(java.lang.Throwable t)
A constructor that is used when a test double tries to throw an exception from a method where the exception is inconsistent with the method's signature. |
Method Summary | |
---|---|
java.lang.String |
getError()
A getter method. |
java.lang.String |
getMessage()
Returns a detailed error message describing the exception. |
Methods inherited from class java.lang.Throwable |
---|
printStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HammockException(java.lang.Class throwingClass, java.lang.String errorMessage)
throwingClass
- The class of the object that threw the exception.errorMessage
- A descriptive error message.public HammockException(MockMethod method, java.lang.String errorMessage)
method
- The method invoked on a test double that led to the exception.errorMessage
- A descriptive error message.public HammockException(java.lang.Throwable t)
t
- An exception that a test double tried to throw.Method Detail |
---|
public java.lang.String getError()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |