鴻蒙OS SecurityException

2022-06-01 17:14 更新

SecurityException

java.lang.Object

|---java.lang.Throwable

|---|---java.lang.Exception

|---|---|---java.lang.RuntimeException

|---|---|---|---java.lang.SecurityException

public class SecurityException
extends RuntimeException

由安全管理器拋出以指示安全違規(guī)。

構(gòu)造函數(shù)摘要

構(gòu)造函數(shù) 描述
SecurityException() 構(gòu)造一個(gè)沒有詳細(xì)消息的 SecurityException。
SecurityException(String s) 使用指定的詳細(xì)消息構(gòu)造一個(gè) SecurityException。
SecurityException(String message, Throwable cause) 使用指定的詳細(xì)消息和原因創(chuàng)建 SecurityException。
SecurityException(Throwable cause) 創(chuàng)建具有指定原因的 SecurityException 和 (cause==null ? null : cause.toString()) 的詳細(xì)消息(通常包含原因的類和詳細(xì)消息)。

方法總結(jié)

從類 java.lang.Object 繼承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
從類 java.lang.Throwable 繼承的方法
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

構(gòu)造函數(shù)詳細(xì)信息

SecurityException

public SecurityException()

構(gòu)造一個(gè)沒有詳細(xì)消息的 SecurityException。

SecurityException

public SecurityException(String s)

使用指定的詳細(xì)消息構(gòu)造一個(gè) SecurityException。

參數(shù):

參數(shù)名稱 參數(shù)描述
s 詳細(xì)信息。

SecurityException

public SecurityException(String message, Throwable cause)

使用指定的詳細(xì)消息和原因創(chuàng)建 SecurityException。

參數(shù):

參數(shù)名稱 參數(shù)描述
message 詳細(xì)消息(保存以供 Throwable.getMessage() 方法稍后檢索)。
cause 原因(由 Throwable.getCause() 方法保存以供以后檢索)。 (允許使用空值,表示原因不存在或未知。)

SecurityException

public SecurityException(Throwable cause)

創(chuàng)建具有指定原因的 SecurityException 和 (cause==null ? null : cause.toString()) 的詳細(xì)消息(通常包含原因的類和詳細(xì)消息)。

參數(shù):

參數(shù)名稱 參數(shù)描述
cause 原因(由 Throwable.getCause() 方法保存以供以后檢索)。 (允許使用空值,表示原因不存在或未知。)
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)