Examples of initCause()


Examples of java.util.ServiceConfigurationError.initCause()

        }
    }

    private static ServiceConfigurationError configError(final Throwable x) {
        final ServiceConfigurationError error = new ServiceConfigurationError(x.getMessage());
        error.initCause(x);
        return error;
    }

    private static boolean loadProviderAsService() {
        final ServiceLoader<HttpServerProvider> loader = ServiceLoader.load(HttpServerProvider.class, null);
View Full Code Here

Examples of java.util.UnknownFormatConversionException.initCause()

      return format.parse(dateTime);
    }
    catch (ParseException e)
    {
      UnknownFormatConversionException exc = new UnknownFormatConversionException(dateTime);
      exc.initCause(e);
      throw exc;
    }
  }
 
  /**
 
View Full Code Here

Examples of java.util.concurrent.CancellationException.initCause()

  }

  static final CancellationException cancellationExceptionWithCause(
      @Nullable String message, @Nullable Throwable cause) {
    CancellationException exception = new CancellationException(message);
    exception.initCause(cause);
    return exception;
  }
}
View Full Code Here

Examples of java.util.concurrent.TimeoutException.initCause()

                        lastException = ex;
                        Thread.sleep(500);
                    }
                }
                TimeoutException timeoutException = new TimeoutException();
                timeoutException.initCause(lastException);
                throw timeoutException;
            }
        };
        ExecutorService executor = Executors.newSingleThreadExecutor();
        Future<MBeanServerConnection> future = executor.submit(callable);
View Full Code Here

Examples of java.util.zip.ZipException.initCause()

          throw (IOException) e.getException();
        throw (RuntimeException) e.getException();
      }
    } catch (ZipException e) {
      ZipException zipNameException = new ZipException("Exception in opening zip file: " + file.getPath()); //$NON-NLS-1$
      zipNameException.initCause(e);
      throw zipNameException;
    } catch (IOException e) {
      IOException fileNameException = new IOException("Exception in opening zip file: " + file.getPath()); //$NON-NLS-1$
      fileNameException.initCause(e);
      throw fileNameException;
View Full Code Here

Examples of javax.ejb.ConcurrentAccessException.initCause()

                } catch(InterruptedException ie)  {
                    String msg = "Serialized access attempt on method " + inv.beanMethod +
                            " for ejb " + ejbDescriptor.getName() + " was interrupted within " +
                             + lockInfo.getTimeout() + " " + lockInfo.getTimeUnit();
                    ConcurrentAccessException cae = new ConcurrentAccessTimeoutException(msg);
                    cae.initCause(ie);
                    throw cae;
                }
            } else {
                sc.getStatefulWriteLock().lock();
            }
View Full Code Here

Examples of javax.ejb.ConcurrentAccessTimeoutException.initCause()

                } catch(InterruptedException ie)  {
                    String msg = "Serialized access attempt on method " + inv.beanMethod +
                            " for ejb " + ejbDescriptor.getName() + " was interrupted within " +
                             + lockInfo.getTimeout() + " " + lockInfo.getTimeUnit();
                    ConcurrentAccessException cae = new ConcurrentAccessTimeoutException(msg);
                    cae.initCause(ie);
                    throw cae;
                }
            } else {
                sc.getStatefulWriteLock().lock();
            }
View Full Code Here

Examples of javax.ejb.CreateException.initCause()

        Blob blob = null;
        try {
            blob = new Blob(timedObjectPrimaryKey, info);
        } catch(IOException ioe) {
            CreateException ce = new CreateException();
            ce.initCause(ioe);
            throw ce;
        }

        setBlob(blob);
        setState(ACTIVE);
View Full Code Here

Examples of javax.ejb.EJBException.initCause()

     
      throw exn;
    }
    else {
      RuntimeException exn = new EJBException();
      exn.initCause(e);
     
      throw exn;
    }
  }
View Full Code Here

Examples of javax.ejb.EJBTransactionRequiredException.initCause()

                return tre;
            }
            // else
            EJBTransactionRequiredException ejbTransRequiredException = new EJBTransactionRequiredException(throwable
                    .getMessage());
            ejbTransRequiredException.initCause(throwable);
            return ejbTransRequiredException;
        }
        return throwable;
    }
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.