Added in API level 37

WrongThreadException

class WrongThreadException : RuntimeException
kotlin.Any
   ↳ kotlin.Throwable
   ↳ java.lang.Exception
   ↳ java.lang.RuntimeException
   ↳ java.lang.WrongThreadException

Thrown to indicate that a method has been called on the wrong thread.

Summary

Public constructors

Constructs a WrongThreadException with no detail message.

Constructs a WrongThreadException with the given detail message.

WrongThreadException(message: String!, cause: Throwable!)

Constructs a WrongThreadException with the given detail message and cause.

Constructs a WrongThreadException with the given cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

Public constructors

WrongThreadException

Added in API level 37
WrongThreadException()

Constructs a WrongThreadException with no detail message.

WrongThreadException

Added in API level 37
WrongThreadException(s: String!)

Constructs a WrongThreadException with the given detail message.

Parameters
s String!: the String that contains a detailed message, can be null

WrongThreadException

Added in API level 37
WrongThreadException(
    message: String!,
    cause: Throwable!)

Constructs a WrongThreadException with the given detail message and cause.

Parameters
message String!: the detail message, can be null
cause Throwable!: the cause, can be null

WrongThreadException

Added in API level 37
WrongThreadException(cause: Throwable!)

Constructs a WrongThreadException with the given cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

Parameters
cause Throwable!: the cause, can be null