Most visited

Recently visited

Added in API level 21

IllformedLocaleException

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标记。

也可以看看:

Summary

Public constructors

IllformedLocaleException()

构造不带详细消息的新 IllformedLocaleException ,并将-1作为错误索引。

IllformedLocaleException(String message)

用给定的消息构造新的 IllformedLocaleException ,并将-1作为错误索引。

IllformedLocaleException(String message, int errorIndex)

用给定的消息和错误索引构造一个新的 IllformedLocaleException 。

Public methods

int getErrorIndex()

返回发现错误的索引。

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Public constructors

IllformedLocaleException

Added in API level 21
IllformedLocaleException ()

构造一个没有详细消息的新的 IllformedLocaleException ,并将-1作为错误索引。

IllformedLocaleException

Added in API level 21
IllformedLocaleException (String message)

使用给定的消息构造一个新的 IllformedLocaleException ,并将-1作为错误索引。

Parameters
message String: the message

IllformedLocaleException

Added in API level 21
IllformedLocaleException (String message, 
                int errorIndex)

用给定的消息和错误索引构造一个新的IllformedLocaleException 。 错误指数是从不合格值开始到解析首次检测到错误的点的大致偏移量。 负面错误索引值表示错误索引不适用或未知。

Parameters
message String: the message
errorIndex int: the index

Public methods

getErrorIndex

Added in API level 21
int getErrorIndex ()

返回发现错误的索引。 负值表示错误索引不适用或未知。

Returns
int the error index

Hooray!