Example of Inkscape handling corrupt input file?
Can somebody please point me to an example in Inkscape where code which is importing from some other format handles an exception and notifies the user? Ideally this would automagically work with both GUI interactive sessions (where it would open a pop up dialog and send a message to stderr) and command line processing (just the message to stderr).
There are three cases which need to be handled:
1. One or more records were corrupt and were ignored. 2. Unsupported record types were seen and were ignored. 3. Input failed completely because the file was missing mandatory records.
and in terms of notification, presumably they would all use the same mechanism. However, in the 3rd case, when a file import gives up how should it return "nothing" to the program? For the EMF/WMF imports, since they are creating an SVG and passing that back anyway, it could do something cheesy like creating a drawing with a text box saying:
The import of file xyz failed
but then the end user has to delete this window, in addition to dismissing the pop up warning box. Would Inkscape just ignore it if the returned SVG was an empty string, or would that trigger yet another set of warnings?
Thanks,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
participants (1)
-
mathog