Examples of initCause()


Examples of java.io.ObjectStreamException.initCause()

            return SerializationSupport.readResolve(serviceId);
        }
        catch (Exception ex)
        {
            ObjectStreamException ose = new InvalidObjectException(ex.getMessage());
            ose.initCause(ex);

            throw ose;
        }
    }
View Full Code Here

Examples of java.io.StreamCorruptedException.initCause()

                                                       + fields[i].type.kind().value());
                }
            }
        } catch (Throwable t) {
            StreamCorruptedException result = new StreamCorruptedException(t.getMessage());
            result.initCause(t);
            throw result;
        }
    }

    /**
 
View Full Code Here

Examples of java.io.SyncFailedException.initCause()

        }
        catch( ClosedChannelException cce) { throw cce;}
        catch( IOException ioe)
        {
            SyncFailedException sne = new SyncFailedException( ioe.getMessage());
            sne.initCause( ioe);
            throw sne;
        }
    } // end of sync
}
View Full Code Here

Examples of java.io.UnsupportedEncodingException.initCause()

        try {
            inputBuffer.checkConverter();
        } catch (UnsupportedCharsetException uce) {
            UnsupportedEncodingException uee =
                    new UnsupportedEncodingException(uce.getMessage());
            uee.initCause(uce);
            throw uee;
        }

        if (reader == null) {
            reader = new CoyoteReader(inputBuffer);
View Full Code Here

Examples of java.io.WriteAbortedException.initCause()

            return EJBUtils.createRemoteBusinessObject(businessInterface_,
                                                       stub_);
        } catch(Exception e) {
            WriteAbortedException wae = new WriteAbortedException
                ("RemoteBusinessWrapper.readResolve error", e);
            wae.initCause(e);
            throw wae;
        }

    }
               
View Full Code Here

Examples of java.lang.Exception.initCause()

        if (throwables != null && !throwables.isEmpty()) {
            //we don't have the ability to return all errors.  so return the
            //first one, enough to signal the problem.
            String msg = throwables.get(0).getMessage();
           Exception ex = new Exception(msg);
            ex.initCause(throwables.get(0));
            throw ex;
        } else {
            return true;
        }
  
View Full Code Here

Examples of java.lang.IllegalStateException.initCause()

                throw inactiveTransactionException;
      }
      catch (org.omg.CosTransactions.NoTransaction e1)
      {
                IllegalStateException illegalStateException = new IllegalStateException(jtaLogger.loggerI18N.getString("com.arjuna.ats.internal.jta.transaction.jts.notx"));
                illegalStateException.initCause(e1);
                throw illegalStateException;
      }
      catch (org.omg.CosTransactions.HeuristicMixed e2)
      {
                HeuristicMixedException heuristicMixedException = new javax.transaction.HeuristicMixedException();
View Full Code Here

Examples of java.lang.instrument.IllegalClassFormatException.initCause()

          extractContracts(new ClassReader(contractBytecode));
      return instrumentWithContracts(bytecode, contracts);
    } catch (Throwable t) {
      /* If the class file contains errors, ASM will just crash. */
      IllegalClassFormatException e = new IllegalClassFormatException();
      e.initCause(t);
      throw e;
    }
  }

  /**
 
View Full Code Here

Examples of java.lang.instrument.UnmodifiableClassException.initCause()

        }
        try {
            instrumentation.redefineClasses(definitions);
        } catch (ClassNotFoundException e) {
            UnmodifiableClassException ex = new UnmodifiableClassException();
            ex.initCause(e);
            throw ex;
        }
    }
}
View Full Code Here

Examples of java.net.BindException.initCause()

                    msg = orig.getMessage() + " <null>:" + getPort();
                else
                    msg = orig.getMessage() + " " +
                            getAddress().toString() + ":" + getPort();
                BindException be = new BindException(msg);
                be.initCause(orig);
                throw be;
            }
        }

    }
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.