Package dev.dosya.sdk.exception
Class DosyaUploadException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.dosya.sdk.exception.DosyaException
dev.dosya.sdk.exception.DosyaUploadException
- All Implemented Interfaces:
Serializable
Thrown when a file upload operation fails.
Contains the upload session ID and, for multipart uploads, the part number that failed. This information can be used to resume or diagnose the upload.
- Since:
- 0.1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDosyaUploadException(@NotNull String message, @NotNull String sessionId) Creates a new upload exception with a session ID.DosyaUploadException(@NotNull String message, @NotNull String sessionId, @Nullable Integer partNumber) Creates a new upload exception with a session ID and part number.DosyaUploadException(@NotNull String message, @NotNull String sessionId, @Nullable Integer partNumber, @Nullable Throwable cause) Creates a new upload exception with a session ID, part number, and cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DosyaUploadException
Creates a new upload exception with a session ID.- Parameters:
message- the detail messagesessionId- the upload session ID
-
DosyaUploadException
public DosyaUploadException(@NotNull @NotNull String message, @NotNull @NotNull String sessionId, @Nullable @Nullable Integer partNumber) Creates a new upload exception with a session ID and part number.- Parameters:
message- the detail messagesessionId- the upload session IDpartNumber- the part number that failed, ornull
-
DosyaUploadException
public DosyaUploadException(@NotNull @NotNull String message, @NotNull @NotNull String sessionId, @Nullable @Nullable Integer partNumber, @Nullable @Nullable Throwable cause) Creates a new upload exception with a session ID, part number, and cause.- Parameters:
message- the detail messagesessionId- the upload session IDpartNumber- the part number that failed, ornullcause- the underlying cause, ornull
-
-
Method Details
-
getSessionId
Returns the upload session ID associated with this error.- Returns:
- the session ID
-
getPartNumber
Returns the part number that failed, ornullif not applicable.- Returns:
- the failed part number, or
null
-