Examples of initCause()


Examples of java.awt.image.RasterFormatException.initCause()

              } while (!iterator.nextPixelDone());
          } while (!iterator.nextLineDone());
      } catch (final Exception cause) {
        final RasterFormatException exception = new RasterFormatException(
            cause.getLocalizedMessage());
        exception.initCause(cause);
        throw exception;
      }
      bandNumber++;
    } while (iterator.finishedBands());
  }
View Full Code Here

Examples of java.awt.print.PrinterException.initCause()

            painter = document.getPrintable(pageIndex);
        } catch (Exception e) {
            PrinterException pe =
                    new PrinterException("Error getting page or printable.[ " +
                                          e +" ]");
            pe.initCause(e);
            throw pe;
        }

        /* Get the imageable area from Paper instead of PageFormat
         * because we do not want it adjusted by the page orientation.
View Full Code Here

Examples of java.beans.IntrospectionException.initCause()

        // generic return value.
        type = property.getReadMethod().getDeclaringClass()
          .getDeclaredMethod(property.getReadMethod().getName(), new Class[0]).getReturnType();
      } catch (Exception ex) {
        IntrospectionException introspectionEx = new IntrospectionException("Error getting ");
        introspectionEx.initCause(ex);
        throw introspectionEx;
      }
    }

    public int hashCode () {
View Full Code Here

Examples of java.beans.PropertyVetoException.initCause()

          } catch (IOException ioe) {
            PropertyVetoException e = new PropertyVetoException(
                "Error property file=" + fn + ", " + ioe.toString(),
                event);

            e.initCause(ioe);

            throw e;

          }
        }
View Full Code Here

Examples of java.io.EOFException.initCause()

            mapped.position(pos);
            mapped.get(b, off, len);
            pos += len;
        } catch (IllegalArgumentException e) {
            EOFException e2 = new EOFException("EOF");
            e2.initCause(e);
            throw e2;
        } catch (BufferUnderflowException e) {
            EOFException e2 = new EOFException("EOF");
            e2.initCause(e);
            throw e2;
View Full Code Here

Examples of java.io.FileNotFoundException.initCause()

            catch ( ResourceDoesNotExistException e )
            {
                String msg = "Resource " + name + " does not exist";
                logError( msg, e );
                FileNotFoundException fileNotFoundException = new FileNotFoundException( msg );
                fileNotFoundException.initCause( e );
                throw fileNotFoundException;
            }
            catch ( WagonException e )
            {
                String msg = "Transfer for " + name + " failed";
View Full Code Here

Examples of java.io.IOException.initCause()

import java.io.IOException;

public class _IOException {
  public static IOException createNewInstance(Throwable t){
    IOException io = new IOException();
    io.initCause(t);
    return io;
  }
}
View Full Code Here

Examples of java.io.InterruptedIOException.initCause()

    HTable t = MetaReader.getMetaHTable(ct);
    try {
      t.batch(mutations);
    } catch (InterruptedException e) {
      InterruptedIOException ie = new InterruptedIOException(e.getMessage());
      ie.initCause(e);
      throw ie;
    } finally {
      t.close();
    }
  }
View Full Code Here

Examples of java.io.InvalidClassException.initCause()

    }

    public static InvalidClassException newInvalidClassException(Class clazz,
                                                                 Throwable cause) {
        InvalidClassException exception = new InvalidClassException( clazz.getName() );
        exception.initCause( cause );
        return exception;
    }

    public ClassLoader getClassLoader() {
        return this.classLoader;
View Full Code Here

Examples of java.io.NotSerializableException.initCause()

            return new CertPathRep(type, getEncoded());
        } catch (CertificateException ce) {
            NotSerializableException nse =
                new NotSerializableException
                    ("java.security.cert.CertPath: " + type);
            nse.initCause(ce);
            throw nse;
        }
    }

    /**
 
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.