Package org.openscience.cdk.exception
Class Intractable
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.openscience.cdk.exception.CDKException
-
- org.openscience.cdk.exception.Intractable
-
- All Implemented Interfaces:
Serializable
public final class Intractable extends CDKException
Indicates a computation did not complete within some predefined bound. The bound could be a limit on time, iterations or another quantity. Exceeding the bound means the problem is hard and it was not feasible to continue until completion.- Author:
- John May
- See Also:
- Serialized Form
- Source code:
- main
- Belongs to CDK module:
- core
-
-
Constructor Summary
Constructors Constructor Description Intractable(String message)
Create a new exception with the specified message.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Intractable
timeout(long t)
Utility for creating a message which indicates an operation timed out after a given time in milliseconds,t
.static Intractable
timeout(String desc, long t)
Utility for creating a message which indicates an operation timed out after a given time in milliseconds,t
.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
Intractable
public Intractable(String message)
Create a new exception with the specified message.- Parameters:
message
- a message
-
-
Method Detail
-
timeout
public static Intractable timeout(long t)
Utility for creating a message which indicates an operation timed out after a given time in milliseconds,t
. The message is of the format - "Operation did not finish after {t} ms".- Parameters:
t
- time in milliseconds- Returns:
- a throwable exception
-
timeout
public static Intractable timeout(String desc, long t)
Utility for creating a message which indicates an operation timed out after a given time in milliseconds,t
. A description of the operation can be provided. The message is of the format - "{desc} did not finish after {t} ms".- Parameters:
desc
- description of the operationt
- time in milliseconds- Returns:
- a throwable exception
-
-