< prev index next >

src/java.xml.ws/share/classes/javax/xml/soap/SOAPException.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 81,90 **** --- 81,93 ---- } /** * Constructs a {@code SOAPException} object initialized * with the given {@code Throwable} object. + * + * @param cause a {@code Throwable} object that is to + * be embedded in this {@code SOAPException} object */ public SOAPException(Throwable cause) { super(cause.toString()); initCause(cause); }
*** 101,110 **** --- 104,114 ---- * @return the error or warning message for this * {@code SOAPException} or, if it has none, the * message of the embedded {@code Throwable} object, * if there is one */ + @Override public String getMessage() { String message = super.getMessage(); if (message == null && cause != null) { return cause.getMessage(); } else {
*** 119,128 **** --- 123,133 ---- * * @return the embedded {@code Throwable} object or {@code null} * if there is none */ + @Override public Throwable getCause() { return cause; } /**
*** 149,158 **** --- 154,164 ---- * {@code Throwable} object. (A {@code Throwable} object * cannot be its own cause.) * @throws IllegalStateException if the cause for this {@code SOAPException} object * has already been initialized */ + @Override public synchronized Throwable initCause(Throwable cause) { if (this.cause != null) { throw new IllegalStateException("Can't override cause"); } if (cause == this) {
< prev index next >