object FutureUtil
- Alphabetic
- By Inheritance
- FutureUtil
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def catchAndDoNotAwait(future: => Future[_], failureMessage: => String, onFailure: (Throwable) => Unit = _ => (), level: => Level = Level.ERROR)(implicit loggingContext: ErrorLoggingContext): Unit
Variant of doNotAwait that also catches non-fatal errors thrown while constructing the future.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- lazy val defaultStackTraceFilter: (Thread) => Boolean
- def doNotAwait(future: Future[_], failureMessage: => String, onFailure: (Throwable) => Unit = _ => (), level: => Level = Level.ERROR, closeContext: Option[CloseContext] = None, logPassiveInstanceAtInfo: Boolean = false)(implicit loggingContext: ErrorLoggingContext): Unit
Discard
future
and log an error if it does not complete successfully.Discard
future
and log an error if it does not complete successfully. This is useful to document that aFuture
is intentionally not being awaited upon. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def logOnFailure[T](future: Future[T], failureMessage: => String, onFailure: (Throwable) => Unit = _ => (), level: => Level = Level.ERROR, closeContext: Option[CloseContext] = None, ignorePassiveInstance: Boolean = false)(implicit loggingContext: ErrorLoggingContext): Future[T]
If the future fails, log the associated error and re-throw.
If the future fails, log the associated error and re-throw. The returned future completes after logging.
- def logOnFailureUS[T](future: FutureUnlessShutdown[T], failureMessage: => String, onFailure: (Throwable) => Unit = _ => (), level: => Level = Level.ERROR, closeContext: Option[CloseContext] = None, ignorePassiveInstance: Boolean = false)(implicit loggingContext: ErrorLoggingContext): FutureUnlessShutdown[T]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unwrapCompletionException[A](f: Future[A])(implicit ec: ExecutionContext): Future[A]
Java libraries often wrap exceptions in a future inside a java.util.concurrent.CompletionException when they convert a Java-style future into a Scala-style future.
Java libraries often wrap exceptions in a future inside a java.util.concurrent.CompletionException when they convert a Java-style future into a Scala-style future. When our code then tries to catch our own exceptions, the logic fails because we do not look inside the java.util.concurrent.CompletionException. We therefore want to unwrap such exceptions
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])