Examples of initCause()


Examples of javax.transaction.xa.XAException.initCause()

                prepared = true;
            }
            return result;
        } catch (SQLException e) {
            XAException xa = new XAException(XAException.XAER_RMERR);
            xa.initCause(e);
            throw xa;
        } finally {
            JdbcUtils.closeSilently(stat);
        }
    }
View Full Code Here

Examples of javax.xml.parsers.ParserConfigurationException.initCause()

      {
        RemoteException t;
        try
          {
            Throwable cause = new ParserConfigurationException("Uje!");
            cause.initCause(new OutOfMemoryError("OOO!"));
            cause.fillInStackTrace();
            t = new RemoteException("Thrown remote AUDRIUS" + b, cause);

          }
        catch (Exception ex)
View Full Code Here

Examples of javax.xml.rpc.soap.SOAPFaultException.initCause()

                  DeserializerSupport des = (DeserializerSupport)desFactory.getDeserializer();
                  Object userEx = des.deserialize(xmlName, xmlType, xmlFragment, serContext);
                  if (userEx == null || (userEx instanceof Exception) == false)
                     throw new WSException("Invalid deserialization result: " + userEx);

                  faultEx.initCause((Exception)userEx);
               }
               catch (RuntimeException rte)
               {
                  throw rte;
               }
View Full Code Here

Examples of javax.xml.ws.WebServiceException.initCause()

      }
      else if (HTTPBinding.HTTP_BINDING.equals(bindingId))
      {
         // FIXME: provide actual status code
         WebServiceException wsEx = new HTTPException(-1);
         wsEx.initCause(ex);
         throw wsEx;
      }
      else
      {
         throw new WebServiceException("Unsuported binding: " + bindingId, ex);
View Full Code Here

Examples of javax.xml.ws.http.HTTPException.initCause()

            if (ex instanceof Fault && ex.getCause() instanceof IOException) {
                throw new WebServiceException(ex.getMessage(), ex.getCause());
            }
            if (getBinding() instanceof HTTPBinding) {
                HTTPException exception = new HTTPException(HttpURLConnection.HTTP_INTERNAL_ERROR);
                exception.initCause(ex);
                throw exception;
            } else if (getBinding() instanceof SOAPBinding) {
                SOAPFault soapFault = createSoapFault((SOAPBinding)getBinding(), ex);
                if (soapFault == null) {
                    throw new WebServiceException(ex);
View Full Code Here

Examples of javax.xml.ws.soap.SOAPFaultException.initCause()

            str.append(s.toString());
            str.append("\n");
        }
       
        SOAPFaultException sfe = createSOAPFaultEx(soapFactory, faultCode, str.toString());
        sfe.initCause(cause);
        return sfe;
    }
   
    public static SOAPFaultException createSOAPFaultEx(SOAPFactory soapFactory,
                                                       QName faultCode,
View Full Code Here

Examples of javax.xml.xquery.XQException.initCause()

            } else {
                throw new XPathException("Java object cannot be converted to an XQuery value");
            }
        } catch (XPathException e) {
            XQException xqe = new XQException(e.getMessage());
            xqe.initCause(e);
            throw xqe;
        }
    }

   /**
 
View Full Code Here

Examples of junit.framework.AssertionFailedError.initCause()

         return (StringPageListAccess)ois.readObject();
      }
      catch (Exception e)
      {
         AssertionFailedError afe = new AssertionFailedError();
         afe.initCause(e);
         throw afe;
      }
   }
}
View Full Code Here

Examples of net.sf.saxon.javax.xml.xquery.XQException.initCause()

                } else {
                    throw new XQException("Value is out of range for requested type");
                }
            } catch (XPathException err) {
                XQException xqe = new XQException(err.getMessage());
                xqe.initCause(err);
                throw xqe;
            }
        }
        throw new XQException("Value is not numeric");
    }
View Full Code Here

Examples of net.sourceforge.htmlunit.corejs.javascript.JavaScriptException.initCause()

    } catch (EcmaError ex) {

      final JavaScriptException wrappedEx = new JavaScriptException(
          "Error executing script: " + name, name, 0);

      wrappedEx.initCause(ex);

      throw wrappedEx;
    } catch (IOException ex) {
      throw new JavaScriptException("Error reading script: " + name, name, 0);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.