Programmer Reference : Common File System : Handling errors : Suppressing system error dialogs
Suppressing system error dialogs
On some platforms, certain file system errors, such as "drive not ready" and "disk change required," causes a system error dialog to appear. You can suppress this dialog by sending systemErrorDialog: to CfsError class. An example is as follows:
"Get volume info for drive A, ignoring drive not ready."
| state volumeInfo |
"Turn off system error dialog."
state := CfsError systemErrorDialog: false.
"Get volume info for drive A:"
volumeInfo := CfsVolumeInfo volumeInfo: 'A:\'.
"Reset system error dialog to original state"
CfsError systemErrorDialog: state.
^volumeInfo
Tip:
On platforms that do not support dialog suppression, systemErrorDialog: has no effect.
Last modified date: 01/29/2015