public class IllformedLocaleException
extends RuntimeException
| java.lang.Object | ||||
| java.lang.Throwable | ||||
| java.lang.Exception | ||||
| java.lang.RuntimeException | ||||
| java.util.IllformedLocaleException | ||||
通过 Locale和 Locale.Builder的方法抛出,以指示参数不是格式良好的BCP 47标记。
也可以看看:
Public constructors |
|
|---|---|
IllformedLocaleException() 构造不带详细消息的新 |
|
IllformedLocaleException(String message) 用给定的消息构造新的 |
|
IllformedLocaleException(String message, int errorIndex) 用给定的消息和错误索引构造一个新的 |
|
公共方法(Public methods) |
|
|---|---|
int |
getErrorIndex() 返回发现错误的索引。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Throwable
|
|
java.lang.Object
|
|
IllformedLocaleException ()
构造一个没有详细消息的新的 IllformedLocaleException ,并将-1作为错误索引。
IllformedLocaleException (String message)
使用给定的消息构造一个新的 IllformedLocaleException ,并将-1作为错误索引。
| 参数(Parameters) | |
|---|---|
message |
String: the message |
IllformedLocaleException (String message, int errorIndex)
用给定的消息和错误索引构造一个新的IllformedLocaleException 。 错误指数是从不合格值开始到解析首次检测到错误的点的大致偏移量。 负面错误索引值表示错误索引不适用或未知。
| 参数(Parameters) | |
|---|---|
message |
String: the message |
errorIndex |
int: the index |
int getErrorIndex ()
返回发现错误的索引。 负值表示错误索引不适用或未知。
| 返回(Returns) | |
|---|---|
int |
the error index |