try { if (selection.y - selection.x > 0) { setClipboardContent(selection.x, selection.y - selection.x, DND.SELECTION_CLIPBOARD); } } catch (SWTError error) {     if (error.code != DND.ERROR_CANNOT_SET_CLIPBOARD) { throw error; } }
void sendSelectionEvent() {	getAccessible().textSelectionChanged();	Event event = new Event();	event.x = selection.x;	event.y = selection.y;	notifyListeners(SWT.Selection, event);	try {		if (selection.y - selection.x > 0) {			setClipboardContent(selection.x, selection.y - selection.x, DND.SELECTION_CLIPBOARD);		}	}	catch (SWTError error) {		// Copy to clipboard failed. This happens when another application 		// is accessing the clipboard while we copy. Ignore the error.		// Fixes 1GDQAVN		// Rethrow all other errors. Fixes bug 17578.		if (error.code != DND.ERROR_CANNOT_SET_CLIPBOARD) {			throw error;		}	}}