Examples of initCause()


Examples of com.google.gwt.core.shared.SerializableThrowable.initCause()

  public void testSerializableThrowable() {
    SerializableThrowable expected = new SerializableThrowable(null, "msg");
    expected.setDesignatedType("x", true);
    expected.setStackTrace(new StackTraceElement[] {new StackTraceElement("c", "m", "f", 42)});
    expected.initCause(new SerializableThrowable(null, "cause"));

    checkException(expected, new AsyncCallback<SerializableThrowable>() {
      @Override
      public void onFailure(Throwable caught) {
        TestSetValidator.rethrowException(caught);
View Full Code Here

Examples of com.google.gwt.http.client.RequestPermissionException.initCause()

      } else {
        xmlHttpRequest.open(httpMethod, url);
      }
    } catch (JavaScriptException e) {
      RequestPermissionException requestPermissionException = new RequestPermissionException(url);
      requestPermissionException.initCause(new RequestException(e.getMessage()));
      onError(null, e);
      return;
    }

    JsUtils.prop(xmlHttpRequest, "onprogress", JsUtils.wrapFunction(new Function() {
View Full Code Here

Examples of com.granule.json.JSONException.initCause()

        super();    
        try {
            this.tokenizer = new Tokenizer(reader, false);
        } catch (IOException iox) {
            JSONException jex = new JSONException("Error occurred during input read.");
            jex.initCause(iox);
            throw jex;
        }
    }

    /**
 
View Full Code Here

Examples of com.gwtplatform.dispatch.rpc.shared.ServiceException.initCause()

            throw e;
        } catch (Exception e) {
            String newMessage = "Service exception executing action \"" + action.getClass().getSimpleName() + "\", " +
                    "" + e.toString();
            ServiceException rethrown = new ServiceException(newMessage);
            rethrown.initCause(e);
            throw rethrown;
        }
    }

    private <A extends Action<R>, R extends Result> void doUndo(A action, R result,
View Full Code Here

Examples of com.ibm.icu.impl.IllegalIcuArgumentException.initCause()

          }
        } catch (IllegalArgumentException e) {
          if (errorCount == 30) {
            IllegalIcuArgumentException icuEx = new IllegalIcuArgumentException(
                "\nMore than 30 errors; further messages squelched");
            icuEx.initCause(e);
            errors.add(icuEx);
            break main;
          }
          e.fillInStackTrace();
          errors.add(e);
View Full Code Here

Examples of com.jcraft.jsch.JSchException.initCause()

            getDir(channel, remoteFile, localFile);
        } catch (SftpException e) {
            JSchException schException = new JSchException("Could not get '"+ remoteFile
                    +"' to '"+localFile+"' - "
                    +e.toString());
            schException.initCause(e);
            throw schException;
        } finally {
            if (channel != null) {
                channel.disconnect();
            }
View Full Code Here

Examples of com.quickorm.dao.DataAccessException.initCause()

    }

    //处理异常
    private void HandleException(Throwable ex, String sql) {
        DataAccessException dae = new DataAccessException();
        dae.initCause(ex);
        dae.setSql(sql);
        throw dae;
    }
}
View Full Code Here

Examples of com.rabbitmq.client.ShutdownSignalException.initCause()

        ShutdownSignalException signal = new ShutdownSignalException(false,
                                                                     initiatedByApplication,
                                                                     reason,
                                                                     this);
        if (cause != null) {
            signal.initCause(cause);
        }

        BlockingRpcContinuation<AMQCommand> k = new SimpleBlockingRpcContinuation();
        boolean notify = false;
        try {
View Full Code Here

Examples of com.sun.appserv.connectors.internal.api.ConnectorRuntimeException.initCause()

            MBeanServerConnection mbsc = connector.getMBeanServerConnection();
            return mbsc;
        } catch (Exception e) {
            e.printStackTrace();
            ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage());
            cre.initCause(e);
            throw cre;
        }
    }

    public void closeMQMBeanServerConnection() throws ConnectorRuntimeException {
View Full Code Here

Examples of com.sun.appserv.connectors.internal.api.PoolingException.initCause()

                dmc.associateConnection(connection);
            } catch (ResourceException e) {
                putbackDirectToPool(handle, spec.getPoolInfo());
                PoolingException pe = new PoolingException(
                        e.getMessage());
                pe.initCause(e);
                throw pe;
            }
        }

        //If the ResourceAdapter does not support lazy enlistment
View Full Code Here
TOP
Copyright © 2015 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.