Package com.oorian
Class HttpFileException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.oorian.OorianRuntimeException
com.oorian.HttpFileException
- All Implemented Interfaces:
Serializable
Unchecked exception thrown when an error occurs during HTTP file processing.
This exception is thrown when the Oorian framework encounters errors while processing files retrieved via HTTP. It wraps the underlying exception and includes the request URL to provide context for debugging. This is particularly useful for diagnosing issues with file downloads, resource fetching, or remote file access.
Common Causes:
- Network errors during file download
- Invalid or malformed URLs
- HTTP error responses (404, 500, etc.)
- I/O errors reading file content
- Connection timeouts
- SSL/TLS certificate errors
Usage:
try {
// Attempt to fetch file via HTTP
InputStream stream = fetchHttpFile(url);
} catch (IOException ex) {
throw new HttpFileException(url, ex);
}
// Exception includes the URL for debugging:
// HttpFileException: http://example.com/file.txt
// Caused by: java.io.IOException: Connection timeout
- Since:
- 2017
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpFileException(String requestUrl, Throwable thrwbl) Constructs a new HttpFileException with the request URL and underlying cause. -
Method Summary
Methods inherited from class com.oorian.OorianRuntimeException
getRequestUrlMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpFileException
Constructs a new HttpFileException with the request URL and underlying cause.The request URL is used as the exception message and is available via
Throwable.getMessage(). The underlying cause provides the root exception that triggered this error.- Parameters:
requestUrl- the URL that was being processed when the error occurredthrwbl- the underlying cause of the exception (e.g., IOException, HttpException)
-