X serial port

X   better message for PortInUseException (full explanation)
X   better message for when serial port code not available/not installed
This commit is contained in:
benfry
2002-11-19 08:44:37 +00:00
parent f12b2b45c3
commit 4fa553d250
5 changed files with 21 additions and 7 deletions

View File

@@ -741,6 +741,14 @@ public class KjcEngine extends PdeEngine {
// has to be before init
applet.serialProperties(PdeBase.properties);
applet.init();
if (applet.exception != null) {
if (applet.exception instanceof javax.comm.PortInUseException) {
throw new PdeException("Another program is already " +
"using the serial port.");
} else {
throw new PdeException(applet.exception.getMessage());
}
}
applet.start();
if (editor.presenting) {