Kbase P149989: SYSTEM-DIALOG GET-FILE raises runtime error 13960 when the default initial file name is not a valid
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/23/2009 |
|
Status: Unverified
SYMPTOM(s):
SYSTEM-DIALOG GET-FILE raises runtime error 13960 when the default initial file name is not a valid file name
Using statement SYSTEM-DIALOG GET-FILE USE-FILENAME
An error occurred while displaying a system dialog box. The system error code is 12290. (13960)
An error occurred while displaying a system dialog box. The system error code is <error code>. (13960)
Initial name is not a valid file name
Initial name is "." or ".."
Initial name ends with "/" or "\"
Initial name contains the "lower than" character
FACT(s) (Environment):
Issue does not happen with regular file names
OpenEdge 10.1C
OpenEdge 10.2x
Windows
OpenEdge Category: Language (4GL/ABL)
CAUSE:
This is expected behavior.
In earlier releases, if an invalid filename was provided the system-dialog would fail to open without any error being raised. This left the developer with no way of identifying why the call fails.
The error was introduced to ensure the failure condition can be trapped and handled.
FIX:
Catch & ignore the error using code similar to the following:
DEFINE VARIABLE c AS CHARACTER INITIAL 'c:\':U NO-UNDO.
DO ON ERROR UNDO, THROW:
SYSTEM-DIALOG GET-FILE c USE-FILENAME.
CATCH e AS Progress.Lang.SysError:
END CATCH.
END.