mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 20:15:22 +02:00
Provide more user friendly message in internalConnect()
This commit is contained in:
parent
f63642694c
commit
8c80bcf7c9
1 changed files with 10 additions and 5 deletions
|
@ -40,11 +40,16 @@ public class WinCEConnectorService extends BasicConnectorService implements IRap
|
||||||
protected void internalConnect(IProgressMonitor monitor) throws Exception {
|
protected void internalConnect(IProgressMonitor monitor) throws Exception {
|
||||||
fireCommunicationsEvent(CommunicationsEvent.BEFORE_CONNECT);
|
fireCommunicationsEvent(CommunicationsEvent.BEFORE_CONNECT);
|
||||||
Rapi.initialize(Rapi.COINIT_MULTITHREADED);
|
Rapi.initialize(Rapi.COINIT_MULTITHREADED);
|
||||||
desktop = IRapiDesktop.getInstance();
|
try {
|
||||||
enumDevices = desktop.enumDevices();
|
desktop = IRapiDesktop.getInstance();
|
||||||
device = enumDevices.next();
|
enumDevices = desktop.enumDevices();
|
||||||
session = device.createSession();
|
device = enumDevices.next();
|
||||||
session.init();
|
session = device.createSession();
|
||||||
|
session.init();
|
||||||
|
} catch (RapiException re) {
|
||||||
|
//TODO externalize the error message
|
||||||
|
throw new Exception("Cannot connect to the remote device (" + re.getMessage() + ")", re); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void internalDisconnect(IProgressMonitor monitor) throws Exception {
|
protected void internalDisconnect(IProgressMonitor monitor) throws Exception {
|
||||||
|
|
Loading…
Add table
Reference in a new issue