public class ContextNotEmptyException extends NamingException
如果程序想要特别处理这个异常,那么在尝试捕获NamingException之前,它应该明确地捕获ContextNotEmptyException。 例如,在捕获ContextNotEmptyException之后,程序可能会尝试在重新尝试破坏之前删除上下文的内容。
适用于NamingException的同步和序列化问题直接在这里应用。
Context.destroySubcontext(javax.naming.Name)
,
Serialized Form
remainingName, resolvedName, resolvedObj, rootException
Constructor and Description |
---|
ContextNotEmptyException()
构造一个具有所有名称解析字段的ContextNotEmptyException的新实例,并将说明初始化为null。
|
ContextNotEmptyException(String explanation)
使用解释构造一个新的ContextNotEmptyException实例。
|
appendRemainingComponent, appendRemainingName, getCause, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, initCause, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public ContextNotEmptyException(String explanation)
explanation
- 可能为空字符串,其中包含有关此异常的其他详细信息。
Throwable.getMessage()
public ContextNotEmptyException()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.