OptionalThrowable

final class OptionalThrowable(exception: Throwable) extends Serializable

An optional Throwable.

class Object
trait Matchable
class Any

Value members

Constructors

def this()

Concrete methods

override def equals(that: Any): Boolean
Definition Classes
Any
def get(): Throwable

Returns the Throwable contained in this OptionalThrowable if defined, else throws IllegalStateException.

Returns the Throwable contained in this OptionalThrowable if defined, else throws IllegalStateException.

To avoid the IllegalStateException, ensure isDefined returns true before calling this method.

Returns:

the contained Throwable, if this OptionalThrowable is defined

Throws:
java.lang.IllegalStateException

if this OptionalThrowable is not defined.

override def hashCode(): Int
Definition Classes
Any

Indicates whether this OptionalThrowable is "defined," i.e., contains a Throwable.

Indicates whether this OptionalThrowable is "defined," i.e., contains a Throwable.

Returns:

true if this OptionalThrowable contains a Throwable

Indicates whether this OptionalThrowable is "empty," i.e., contains no Throwable.

Indicates whether this OptionalThrowable is "empty," i.e., contains no Throwable.

Returns:

true if this OptionalThrowable contains no Throwable

override def toString(): String
Definition Classes
Any