home *** CD-ROM | disk | FTP | other *** search
- package javax.naming;
-
- public class NamingException extends Exception {
- protected Name resolvedName;
- protected Object resolvedObj;
- protected Name remainingName;
- protected Throwable rootException;
-
- public NamingException(String var1) {
- super(var1);
- this.resolvedName = this.remainingName = null;
- this.resolvedObj = null;
- }
-
- public NamingException() {
- this.resolvedName = this.remainingName = null;
- this.resolvedObj = null;
- }
-
- public Name getResolvedName() {
- return this.resolvedName;
- }
-
- public Name getRemainingName() {
- return this.remainingName;
- }
-
- public Object getResolvedObj() {
- return this.resolvedObj;
- }
-
- public String getExplanation() {
- return ((Throwable)this).getMessage();
- }
-
- public void setResolvedName(Name var1) {
- if (var1 != null) {
- this.resolvedName = (Name)var1.clone();
- } else {
- this.resolvedName = null;
- }
- }
-
- public void setRemainingName(Name var1) {
- if (var1 != null) {
- this.remainingName = (Name)var1.clone();
- } else {
- this.remainingName = null;
- }
- }
-
- public void setResolvedObj(Object var1) {
- this.resolvedObj = var1;
- }
-
- public void appendRemainingComponent(String var1) {
- if (var1 != null) {
- try {
- if (this.remainingName == null) {
- this.remainingName = new CompositeName();
- this.remainingName.add(var1);
- } else {
- this.remainingName.add(var1);
- }
- } catch (NamingException var3) {
- throw new IllegalArgumentException(var3.toString());
- }
- }
- }
-
- public void appendRemainingName(Name var1) {
- if (var1 != null) {
- if (this.remainingName != null) {
- try {
- this.remainingName.addAll(var1);
- } catch (NamingException var3) {
- throw new IllegalArgumentException(var3.toString());
- }
- } else {
- this.remainingName = (Name)var1.clone();
- }
- }
- }
-
- public Throwable getRootCause() {
- return this.rootException;
- }
-
- public void setRootCause(Throwable var1) {
- if (var1 != this) {
- this.rootException = var1;
- }
-
- }
-
- public String toString() {
- String var1;
- if (this.rootException != null && this.rootException != this) {
- var1 = "[Root exception is " + this.rootException.toString() + "]";
- } else {
- var1 = "";
- }
-
- if (this.remainingName != null) {
- var1 = var1 + super.toString() + "; Remaining Name: '" + this.remainingName + "'";
- } else {
- var1 = var1 + super.toString();
- }
-
- return var1;
- }
-
- public String toString(boolean var1) {
- return var1 && this.resolvedObj != null ? this.toString() + "; Resolved Object: " + this.resolvedObj : this.toString();
- }
- }
-