@Override public String execute(SelenideElement proxy, WebElementSource locator, Object[] args) { try { return Describe.describe(locator.driver(), locator.getWebElement()); } catch (WebDriverException | ElementNotFound elementDoesNotExist) { return Cleanup.of.webdriverExceptionMessage(elementDoesNotExist); } catch (IndexOutOfBoundsException invalidElementIndex) { return invalidElementIndex.toString(); } } }
public static String describe(Driver driver, WebElement element) { try { if (element == null) { return "null"; } return new Describe(driver, element) .appendAttributes() .isSelected(element) .isDisplayed(element) .serialize(); } catch (WebDriverException elementDoesNotExist) { return Cleanup.of.webdriverExceptionMessage(elementDoesNotExist); } catch (IndexOutOfBoundsException e) { return e.toString(); } }
static String shortly(Driver driver, WebElement element) { try { if (element == null) { return "null"; } if (element instanceof SelenideElement) { return shortly(driver, ((SelenideElement) element).toWebElement()); } return new Describe(driver, element).attr("id").attr("name").flush(); } catch (WebDriverException elementDoesNotExist) { return Cleanup.of.webdriverExceptionMessage(elementDoesNotExist); } catch (IndexOutOfBoundsException e) { return e.toString(); } }
@Override public View getCellView(final int rowIndex, final int columnIndex, final ViewGroup parentView) { final TextView textView = new TextView(getContext()); textView.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom); textView.setTypeface(textView.getTypeface(), typeface); textView.setTextSize(textSize); textView.setTextColor(textColor); textView.setSingleLine(); textView.setEllipsize(TextUtils.TruncateAt.END); try { final String textToShow = getItem(rowIndex)[columnIndex]; textView.setText(textToShow); textView.setGravity(gravity); } catch (final IndexOutOfBoundsException e) { Log.w(LOG_TAG, "No Sting given for row " + rowIndex + ", column " + columnIndex + ". " + "Caught exception: " + e.toString()); // Show no text } return textView; }
@Override public String getSystemDxLevel() { try { return regQuery("HKEY_CURRENT_USER\\Software\\Valve\\Source\\tf\\Settings", "DXLevel_V1"); } catch (IndexOutOfBoundsException e) { log.warning("Could not read registry dxlevel value: " + e.toString() + " -- Using dxlevel 95"); return "5f"; } }
Log.e(TAG, "Failed to edit jiix word candidate: " + e.toString());
Log.e("PatternedEditText: ", e.toString());
Log.e(TAG, "BlueToothDeviceFilter.parseUUID: " + e.toString()); } finally {
log.warn("{} - invalid column number: {} at row {} {}", Thread.currentThread().getName(), columnOrNext, FileWrapper.getCurrentRow(fileName), e.toString());
outputIDs(request, response, ids); } catch (IndexOutOfBoundsException ioobe) { response.sendError(HttpServletResponse.SC_BAD_REQUEST, ioobe.toString());
} catch (IndexOutOfBoundsException iobe) { fail("Node " + node.getPath() + " is not exported." + iobe.toString());
/** * Sets an indexed parameter. */ private Query setInternalParameter(ArgExpr arg, int index, Object value) { try { if (value == null) { _userQuery.setNull(index, java.sql.Types.JAVA_OBJECT); return this; } // jpa/141i boolean valueIsNumber = value instanceof Number; if (valueIsNumber) { // jpa/0w20: type is null. if (arg.getType() != null) { boolean typeIsNumber = arg.getType().isNumeric(); if (! typeIsNumber) throw new IllegalArgumentException(L.l("Type mismatch for parameter index '{0}'. Value '{1}' for type '{2}' is not valid in query '{3}'", index, value, arg.getType().getClass().getName(), _userQuery.getQuery().getSQL())); } } setInternalParameter(null, _userQuery, index, value); return this; } catch (IndexOutOfBoundsException e) { log.log(Level.FINE, e.toString(), e); throw new IllegalArgumentException(L.l("Parameter index '{0}' is not valid for setParameter()", index)); } }