If the application uses URLs in the PROPATH, the application is responsible for handling all errors involving URLs, connections, and authentication.

URL specification errors

If the PROPATH contains an ill-formed URL for example, such as one containing a percent symbol (%) the following processing occurs:

  • When the URL is not a fully qualified path, SEARCH and LOAD-IMAGE( ) do not raise an error, skip the URL, and continue searching with the next entry in the PROPATH.
  • When the URL is a fully qualified path, SEARCH and LOAD-IMAGE( ) raise an error.

Connection errors

If the PROPATH contains a correctly formed URL but the connection to the Web server fails, the following processing occurs:

  • When the URL is not a fully-qualified path, SEARCH and LOAD-IMAGE( ) do not raise an error, and searching continues with the next entry in the PROPATH.
  • When the URL is a fully-qualified path, SEARCH and LOAD-IMAGE( ) raise an error.

Authentication errors

If an application uses SEARCH or LOAD-IMAGE( ), the PROPATH contains a URL, and authentication on a Web server fails, the following processing occurs:

  • When the URL is not a fully qualified path, SEARCH and LOAD-IMAGE( ) do not raise an error and searching continues with the next entry in the PROPATH.
  • When the URL is a fully qualified path:
    • The SEARCH function does not raise an error but returns the Unknown value (?).
    • The LOAD-IMAGE( ), LOAD-IMAGE-DOWN( ), LOAD-IMAGE-UP( ), LOAD-IMAGE-INSENSITIVE( ), and LOAD-ICON( ) methods all raise error 9368, where server-name is the host name of the Web server, as shown:
      Unable to download file from the web. Authentication failed for server server-name.
    • You can trap this error, request a user ID and password, and try to download the image again, as in the following example:
      DEFINE BUTTON Button1.
      Button1:LOAD-IMAGE 
        ("http://userid:password@www.progress.com/myimage.jpg") NO-ERROR.
      IF ERROR-STATUS:GET-NUMBER(1) = 9368 THEN DO:
        /* Display dialog. */
        /* Update URL string. */ 
        /* Retry load-image. */
      END.