Examples of initCause()


Examples of java.security.spec.InvalidKeySpecException.initCause()

        try {
            this.prf = Mac.getInstance(prfAlgo, "SunJCE");
        } catch (NoSuchAlgorithmException nsae) {
            // not gonna happen; re-throw just in case
            InvalidKeySpecException ike = new InvalidKeySpecException();
            ike.initCause(nsae);
            throw ike;
        } catch (NoSuchProviderException nspe) {
            // Again, not gonna happen; re-throw just in case
            InvalidKeySpecException ike = new InvalidKeySpecException();
            ike.initCause(nspe);
View Full Code Here

Examples of java.sql.BatchUpdateException.initCause()

        // while using the Java 8 constructor
        BatchUpdateException batch = new BatchUpdateException
            ( message, sqlState, errorCode, squashLongs( updateCounts ) );
       
        if ( cause instanceof SQLException ) { batch.setNextException( (SQLException) cause ); }
        batch.initCause( cause );

        return batch;
    }

    /** Squash an array of longs into an array of ints */
 
View Full Code Here

Examples of java.sql.DataTruncation.initCause()

                    false,  // parameter
                    true,   // read
                    dataSize,
                    transferSize);

                warning.initCause(se);

                StatementContext statementContext = (StatementContext)
                    ContextService.getContext(ContextId.LANG_STATEMENT);
                statementContext.getActivation().
                        getResultSet().addWarning(warning);
View Full Code Here

Examples of java.sql.SQLClientInfoException.initCause()

            throw e;
         }
         catch (SQLException e)
         {
            SQLClientInfoException t = new SQLClientInfoException();
            t.initCause(e);
            throw t;
         }
      }
      catch (SQLException e)
      {
View Full Code Here

Examples of java.sql.SQLException.initCause()

import java.sql.SQLException;

public class _SQLException {
  public static SQLException createNewInstance(Throwable t){
    SQLException sql = new SQLException();
    sql.initCause(t);
    return sql;
  }
}
View Full Code Here

Examples of java.sql.SQLWarning.initCause()

import java.sql.SQLWarning;

public class _SQLWarning {
  public static SQLWarning createNewInstance(Throwable t){
    SQLWarning sql = new SQLWarning();
    sql.initCause(t);
    return sql;
  }
}
View Full Code Here

Examples of java.text.ParseException.initCause()

      // fromValid(), we implement this method in terms of that one rather
      // than the reverse.

      ParseException parseException =
          new ParseException("Invalid host specifier: " + specifier, 0);
      parseException.initCause(e);
      throw parseException;
    }
  }

  /**
 
View Full Code Here

Examples of java.util.ConcurrentModificationException.initCause()

            requestProto.getServiceName(), requestProto.getMethod());
        if (contents instanceof ConcurrentModificationException) {
          ConcurrentModificationException serverSide = (ConcurrentModificationException) contents;
          ConcurrentModificationException clientSide =
              new ConcurrentModificationException(serverSide.getMessage());
          clientSide.initCause(serverSide);
          throw clientSide;
        } else if (contents instanceof IllegalArgumentException) {
          IllegalArgumentException serverSide = (IllegalArgumentException) contents;
          throw new IllegalArgumentException(serverSide.getMessage(), serverSide);
        } else if (contents instanceof RuntimeException) {
View Full Code Here

Examples of java.util.MissingResourceException.initCause()

            f = c.getField(field);
        } catch (NoSuchFieldException e) {
            // We'll try again below.
        } catch (SecurityException e) {
            RuntimeException r = new MissingResourceException("SecurityException trying to reflect on field field", c.getName(), field);
            r.initCause(e);
            throw r;
        }
        if (f == null) {
            try {
                f = c.getDeclaredField(field);
View Full Code Here

Examples of java.util.NoSuchElementException.initCause()

                }
                catch ( NamingException ne )
                {
                    NoSuchElementException nsee =
                        new NoSuchElementException( I18n.err( I18n.ERR_468 ) );
                    nsee.initCause( ne );
                    throw nsee;
                }
            }
        };
    }
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.