diff --git a/python/common/org/python/exceptions/asyncio/InvalidStateError.java b/python/common/org/python/exceptions/asyncio/InvalidStateError.java new file mode 100644 index 0000000000..b978c1bb55 --- /dev/null +++ b/python/common/org/python/exceptions/asyncio/InvalidStateError.java @@ -0,0 +1,10 @@ +package org.python.exceptions.asyncio; + +/** + * The operation is not allowed in this state. + */ +public class InvalidStateError extends org.python.exceptions.concurrent.Error { + public InvalidStateError(java.lang.String msg) { + super(msg); + } +} diff --git a/python/common/org/python/exceptions/concurrent/CancelledError.java b/python/common/org/python/exceptions/concurrent/CancelledError.java new file mode 100644 index 0000000000..d1f7c5b09f --- /dev/null +++ b/python/common/org/python/exceptions/concurrent/CancelledError.java @@ -0,0 +1,10 @@ +package org.python.exceptions.concurrent; + +/** + * The Future was cancelled. + */ +public class CancelledError extends org.python.exceptions.concurrent.Error { + public CancelledError() { + super(); + } +} diff --git a/python/common/org/python/exceptions/concurrent/Error.java b/python/common/org/python/exceptions/concurrent/Error.java new file mode 100644 index 0000000000..43eeb5d9cd --- /dev/null +++ b/python/common/org/python/exceptions/concurrent/Error.java @@ -0,0 +1,14 @@ +package org.python.exceptions.concurrent; + +/** + * Base class for all future-related exceptions. + */ +public class Error extends org.python.exceptions.Exception { + Error() { + super(); + } + + public Error(java.lang.String msg) { + super(msg); + } +} diff --git a/python/common/org/python/exceptions/concurrent/TimeoutError.java b/python/common/org/python/exceptions/concurrent/TimeoutError.java new file mode 100644 index 0000000000..0925c6258d --- /dev/null +++ b/python/common/org/python/exceptions/concurrent/TimeoutError.java @@ -0,0 +1,10 @@ +package org.python.exceptions.concurrent; + +/** + * The operation exceeded the given deadline. + */ +public class TimeoutError extends org.python.exceptions.concurrent.Error { + public TimeoutError() { + super(); + } +}