Examples of IOException2


Examples of hudson.util.IOException2

            try {
                Util.copyStreamAndClose(ProxyConfiguration.open(url).getInputStream(),new NullOutputStream());
            } catch (SSLHandshakeException e) {
                if (e.getMessage().contains("PKIX path building failed"))
                   // fix up this crappy error message from JDK
                    throw new IOException2("Failed to validate the SSL certificate of "+url,e);
            }
        }
View Full Code Here

Examples of hudson.util.IOException2

                try {
                    pm.dynamicLoad(getDestination());
                } catch (RestartRequiredException e) {
                    throw new SuccessButRequiresRestart(e.message);
                } catch (Exception e) {
                    throw new IOException2("Failed to dynamically deploy this plugin",e);
                }
            } else {
                throw new SuccessButRequiresRestart(Messages._UpdateCenter_DownloadButNotActivated());
            }
        }
View Full Code Here

Examples of hudson.util.IOException2

            mkdirs(path.substring(0,idx), posixPermission);

        try {
            mkdir(path, posixPermission);
        } catch (IOException e) {
            throw new IOException2("Failed to mkdir "+path,e);
        }
    }
View Full Code Here

Examples of hudson.util.IOException2

            if(df.exists())
                try {
                    return JSONObject.fromObject(df.read());
                } catch (JSONException e) {
                    df.delete(); // if we keep this file, it will cause repeated failures
                    throw new IOException2("Failed to parse "+df+" into JSON",e);
                }
            return null;
        }
View Full Code Here

Examples of hudson.util.IOException2

                } finally {
                    ois.close();
                }
            }
        } catch (GeneralSecurityException e) {
            throw new IOException2(e);
        } catch (ClassNotFoundException e) {
            throw new IOException2(e);
        }
        // start from scratch
        return ConsoleAnnotator.initial(context==null ? null : context.getClass());
    }
View Full Code Here

Examples of hudson.util.IOException2

            oos.close();
            StaplerResponse rsp = Stapler.getCurrentResponse();
            if (rsp!=null)
                rsp.setHeader("X-ConsoleAnnotator", new String(Base64.encode(baos.toByteArray())));
        } catch (GeneralSecurityException e) {
            throw new IOException2(e);
        }
        return r;
    }
View Full Code Here

Examples of hudson.util.IOException2

                ois.close();
            }
        } catch (Error e) {
            // for example, bogus 'sz' can result in OutOfMemoryError.
            // package that up as IOException so that the caller won't fatally die.
            throw new IOException2(e);
        }
    }
View Full Code Here

Examples of hudson.util.IOException2

                process.cancel(true);
                throw e;
            } catch (ExecutionException e) {
                if(e.getCause() instanceof IOException)
                    throw (IOException)e.getCause();
                throw new IOException2("Failed to join the process",e);
            } catch (CancellationException x) {
                return -1;
            }
        }
View Full Code Here

Examples of hudson.util.IOException2

        }
        InputStream in = new BufferedInputStream(new FileInputStream(file));
        try {
            return xs.fromXML(in);
        } catch(StreamException e) {
            throw new IOException2("Unable to read "+file,e);
        } catch(ConversionException e) {
            throw new IOException2("Unable to read "+file,e);
        } catch(Error e) {// mostly reflection errors
            throw new IOException2("Unable to read "+file,e);
        } finally {
            in.close();
        }
    }
View Full Code Here

Examples of hudson.util.IOException2

        InputStream in = new BufferedInputStream(new FileInputStream(file));
        try {
            // TODO: expose XStream the driver from XStream
            return xs.unmarshal(DEFAULT_DRIVER.createReader(in), o);
        } catch (StreamException e) {
            throw new IOException2("Unable to read "+file,e);
        } catch(ConversionException e) {
            throw new IOException2("Unable to read "+file,e);
        } catch(Error e) {// mostly reflection errors
            throw new IOException2("Unable to read "+file,e);
        } finally {
            in.close();
        }
    }
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.