本文整理了Java中java.lang.IndexOutOfBoundsException.toString()
方法的一些代码示例,展示了IndexOutOfBoundsException.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IndexOutOfBoundsException.toString()
方法的具体详情如下:
包路径:java.lang.IndexOutOfBoundsException
类名称:IndexOutOfBoundsException
方法名:toString
暂无
代码示例来源:origin: selenide/selenide
@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();
}
}
}
代码示例来源:origin: selenide/selenide
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();
}
}
代码示例来源:origin: selenide/selenide
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();
}
}
代码示例来源:origin: ISchwarz23/SortableTableView
@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;
}
代码示例来源:origin: quanticc/lawena-recording-tool
@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";
}
}
代码示例来源:origin: MyScript/interactive-ink-examples-android
Log.e(TAG, "Failed to edit jiix word candidate: " + e.toString());
代码示例来源:origin: faradaj/PatternedEditText
Log.e("PatternedEditText: ", e.toString());
代码示例来源:origin: adafruit/Bluefruit_LE_Connect_Android
Log.e(TAG, "BlueToothDeviceFilter.parseUUID: " + e.toString());
} finally {
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_functions
log.warn("{} - invalid column number: {} at row {} {}",
Thread.currentThread().getName(), columnOrNext,
FileWrapper.getCurrentRow(fileName), e.toString());
代码示例来源:origin: myrrix/myrrix-recommender
outputIDs(request, response, ids);
} catch (IndexOutOfBoundsException ioobe) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST, ioobe.toString());
代码示例来源:origin: apache/jackrabbit
} catch (IndexOutOfBoundsException iobe) {
fail("Node " + node.getPath() + " is not exported."
+ iobe.toString());
代码示例来源:origin: com.caucho/resin
/**
* 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));
}
}
内容来源于网络,如有侵权,请联系作者删除!