tinyscalautils.lang
Members list
Type members
Classlikes
Checks for thread interrupts at construction time.
Checks for thread interrupts at construction time.
This can be mixed in to make code more responsive to interrupts:
class MyFancyClass extends SomeInterface with InterruptibleConstructor:
...
If a thread is interrupted and then attempts to create an instance of MyFancyClass
, an InterruptedException
will be thrown.
Attributes
- Since
-
1.0
- Source
- InterruptibleConstructor.scala
- Supertypes
Checks for thread interrupts in equals
and hashCode
.
Checks for thread interrupts in equals
and hashCode
.
This can be used to make code more responsive to interrupts, e.g.:
class MyFancyClass extends SomeInterface with InterruptibleEquality:
...
If a thread is interrupted and then attempts to call equals
or hashCode
, an InterruptedException
will be thrown; otherwise, the call is forwarded to the super method.
Note that ==
and ##
rely on equals
and hasCode
, and thus will also throw the InterruptedException
.
Attributes
- Since
-
1.0
- Source
- InterruptibleEquality.scala
- Supertypes
Stack overflows as exceptions instead of errors.
Stack overflows as exceptions instead of errors.
Attributes
- Throws
-
IllegalArgumentException
if error is null.
- Constructor
-
Builds a new exception with the same message, cause and stack trace as the error. Note that
error
is not used as cause. See tinyscalautils.control.noStackOverflow - Since
-
1.0
- Source
- StackOverflowException.scala
- Supertypes
-
class RuntimeExceptionclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Value members
Concrete methods
The unique value of type Unit
.
The unique value of type Unit
.
The name unit
is sometimes convenient when ()
is confusing.
Attributes
- Since
-
1.0
- Source
- unit.scala