Examples of initCause()


Examples of org.apache.qpid.client.vmbroker.AMQVMBrokerCreationException.initCause()

                because = e.getCause().toString();
            }

            AMQVMBrokerCreationException amqbce =
                new AMQVMBrokerCreationException(null, port, because + " Stopped InVM Qpid.AMQP creation", null);
            amqbce.initCause(e);
            throw amqbce;
        }

        return provider;
    }
View Full Code Here

Examples of org.apache.sis.internal.util.LocalizedParseException.initCause()

        source = CharSequences.trimWhitespaces(source);
        try {
            return valueOf(source);
        } catch (NumberFormatException cause) {
            ParseException e = new LocalizedParseException(null, type, source, null);
            e.initCause(cause);
            throw e;
        }
    }

    /**
 
View Full Code Here

Examples of org.apache.sis.storage.DataStoreException.initCause()

                for (int i=0; i<n; i++) {
                    varDims[i] = dimensions[input.readInt()];
                }
            } catch (IndexOutOfBoundsException cause) {
                final DataStoreException e = malformedHeader();
                e.initCause(cause);
                throw e;
            }
            /*
             * Following block is almost a copy-and-paste of similar block in the contructor,
             * but with less cases in the "switch" statements.
View Full Code Here

Examples of org.apache.sling.engine.auth.NoAuthenticationHandlerException.initCause()

    public void login(HttpServletRequest request, HttpServletResponse response) {
        try {
            slingAuthenticator.login(request, response);
        } catch (org.apache.sling.api.auth.NoAuthenticationHandlerException nahe) {
            final NoAuthenticationHandlerException wrapped = new NoAuthenticationHandlerException();
            wrapped.initCause(nahe);
            throw wrapped;
        }
    }

    public void logout(HttpServletRequest request, HttpServletResponse response) {
View Full Code Here

Examples of org.apache.thrift.TApplicationException.initCause()

                } else {
                    // unexpected exception
                    TApplicationException applicationException =
                      new TApplicationException(INTERNAL_ERROR,
                                                "Internal error processing " + method.getName());
                    applicationException.initCause(e);

                    // Application exceptions are sent to client, and the connection can be reused
                    out.writeMessageBegin(new TMessage(name, TMessageType.EXCEPTION, sequenceId));
                    applicationException.write(out);
                    out.writeMessageEnd();
View Full Code Here

Examples of org.apache.thrift.TException.initCause()

          throw (ConfigValSecurityException) e;
        } else if (e instanceof TException) {
          throw (TException) e;
        } else {
          TException te = new TException(e.toString());
          te.initCause(e);
          throw te;
        }
      } finally {
        endFunction("get_config_value", success, ex);
      }
View Full Code Here

Examples of org.apache.uima.cas.CASRuntimeException.initCause()

  }

  /** throws (an unchecked) CASRuntimeException */
  private void logAndThrow(Exception e) {
    CASRuntimeException casEx = new CASRuntimeException(CASRuntimeException.JCAS_CAS_MISMATCH);
    casEx.initCause(e);
    throw casEx;
  }


  // never called, but have to set values to null because they're final
View Full Code Here

Examples of org.apache.wicket.authorization.UnauthorizedInstantiationException.initCause()

        }
       
        // Otherwise bubble up the error
        UnauthorizedInstantiationException ex;
        ex = new UnauthorizedInstantiationException(component.getClass());
        ex.initCause(cause);
        throw ex;
    }

    // End IUnauthorizedComponentInstantiationListener methods ---------------
View Full Code Here

Examples of org.apache.wink.json4j.JSONException.initCause()

                } catch (Exception ex) {
                    if (ex instanceof JSONException) {
                        throw (JSONException)ex;
                    } else {
                        JSONException jex = new JSONException("Error in converting JSON to Java Class");
                        jex.initCause(ex);
                        throw jex;
                    }
                }
            } else {
                throw new JSONException("Provided JSONObject does not contain attributes '_classname' or '_type'");
View Full Code Here

Examples of org.apache.wink.json4j.compat.JSONException.initCause()

        try {
            org.apache.wink.json4j.JSONArray jArray = new org.apache.wink.json4j.JSONArray(collection);
            return new org.apache.wink.json4j.compat.impl.ApacheJSONArrayDelegate(jArray);
        } catch (Exception ex) {
            JSONException jex = new JSONException(ex.getMessage());
            jex.initCause(ex);
            throw jex;
        }
    }

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.