PORTOPEN, PORTCLOSE, PORTFLUSH, PORTREADARRAY, PORTWRITEARRAY, PORTREADCHAR, and PORTWRITECHAR all show modal message boxes and throw "Stopping..." error when they fail.
This is inconsistent with how the rest of the procedures behave, so it should be corrected.
I have reproduced this in FMSLogo 7.7.0, but the behavior has existed since at least MSWLogo 6.5b.
How Reproducible:
Every Time
Steps to Reproduce:
1) Start a new instance of FMSLogo
2) Run PORTCLOSE
What Happens:
You see a dialog box that says "Could not close port", then the commander prints "Stopping...", which indicates that a stop error was thrown.
Expected Result:
FMSLogo does not display a message box. Instead it throws an error that is specific to the problem, which might be a COM-specific error or a generic "invalid state for instruction" error.
This is fixed by [r5446]. The fix will be available in FMSLogo 8.0.0.
The fix throws a new error code using the message of the dialog box that used to be displayed, except that the error when closing a port that wasn't open now uses the error code for "port not open" instead of a code for "error closing port". This was done for consistency with the other procedures and to remove a string from the translation table.
Related
Commit: [r5446]