Class CreationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.schabi.newpipe.extractor.services.youtube.dashmanifestcreators.CreationException
-
- All Implemented Interfaces:
java.io.Serializable
public final class CreationException extends java.lang.RuntimeException
Exception that is thrown when a YouTube DASH manifest creator encounters a problem while creating a manifest.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CreationException(java.lang.String message)
Create a newCreationException
with a detail message.CreationException(java.lang.String message, java.lang.Exception cause)
Create a newCreationException
with a detail message and a cause.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CreationException
couldNotAddElement(java.lang.String element, java.lang.Exception cause)
Create a newCreationException
with a cause and the following detail message format:
"Could not add " + element + " element", cause
, whereelement
is an element of a DASH manifest.static CreationException
couldNotAddElement(java.lang.String element, java.lang.String reason)
Create a newCreationException
with a cause and the following detail message format:
"Could not add " + element + " element: " + reason
, whereelement
is an element of a DASH manifest andreason
the reason why this element cannot be added to the DASH document.
-
-
-
Constructor Detail
-
CreationException
public CreationException(java.lang.String message)
Create a newCreationException
with a detail message.- Parameters:
message
- the detail message to add in the exception
-
CreationException
public CreationException(java.lang.String message, java.lang.Exception cause)
Create a newCreationException
with a detail message and a cause.- Parameters:
message
- the detail message to add in the exceptioncause
- the exception cause of thisCreationException
-
-
Method Detail
-
couldNotAddElement
@Nonnull public static CreationException couldNotAddElement(java.lang.String element, java.lang.Exception cause)
Create a newCreationException
with a cause and the following detail message format:
"Could not add " + element + " element", cause
, whereelement
is an element of a DASH manifest.- Parameters:
element
- the element which was not added to the DASH documentcause
- the exception which prevented addition of the element to the DASH document- Returns:
- a new
CreationException
-
couldNotAddElement
@Nonnull public static CreationException couldNotAddElement(java.lang.String element, java.lang.String reason)
Create a newCreationException
with a cause and the following detail message format:
"Could not add " + element + " element: " + reason
, whereelement
is an element of a DASH manifest andreason
the reason why this element cannot be added to the DASH document.- Parameters:
element
- the element which was not added to the DASH documentreason
- the reason message of why the element has been not added to the DASH document- Returns:
- a new
CreationException
-
-