PROPATH error handling
- Last Updated: August 28, 2019
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
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,
SEARCHandLOAD-IMAGE( )do not raise an error, skip the URL, and continue searching with the next entry in thePROPATH. - When the URL is a fully qualified path,
SEARCHandLOAD-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,
SEARCHandLOAD-IMAGE( )do not raise an error, and searching continues with the next entry in thePROPATH. - When the URL is a fully-qualified path,
SEARCHandLOAD-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,
SEARCHandLOAD-IMAGE( )do not raise an error and searching continues with the next entry in thePROPATH. - When the URL is a fully qualified path:
- The
SEARCHfunction does not raise an error but returns theUnknown value (?). - The
LOAD-IMAGE( ),LOAD-IMAGE-DOWN( ),LOAD-IMAGE-UP( ),LOAD-IMAGE-INSENSITIVE( ), andLOAD-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.
- The