Class AdException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.castlabs.android.player.exceptions.AdException
All Implemented Interfaces:
Serializable

public class AdException extends Exception
Describes an error that occurred while requesting, preparing, or playing an ad.
See Also:
  • Constructor Details

    • AdException

      public AdException(@NonNull AdException.Type type, @NonNull String message)
      Creates an ad exception without an underlying cause.
      Parameters:
      type - The specific type of ad error
      message - A message describing the error
    • AdException

      public AdException(@NonNull AdException.Type type, @NonNull String message, @Nullable Throwable cause)
      Creates an ad exception with an optional underlying cause.
      Parameters:
      type - The specific type of ad error
      message - A message describing the error
      cause - The underlying cause, or null if unavailable
  • Method Details

    • getType

      @NonNull public AdException.Type getType()
      Returns the specific type of ad error.
      Returns:
      The ad error type