Package com.oorian

Class HttpFileException

All Implemented Interfaces:
Serializable

public class HttpFileException extends OorianRuntimeException
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 Details

    • HttpFileException

      public HttpFileException(String requestUrl, Throwable thrwbl)
      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 occurred
      thrwbl - the underlying cause of the exception (e.g., IOException, HttpException)