Package yalp.exceptions

Examples of yalp.exceptions.UnexpectedException


            ZipOutputStream zos = new ZipOutputStream(os);
            zipDirectory(directory, directory, zos);
            zos.close();
            os.close();
        } catch (Exception e) {
            throw new UnexpectedException(e);
        }
    }
View Full Code Here


                        invocation.retry.task.get();
                    } else {
                        Thread.sleep(invocation.retry.timeout);
                    }
                } catch (Exception e) {
                    throw new UnexpectedException(e);
                }
                retry = true;
            }
        }
    }
View Full Code Here

        public boolean init() {
            Thread.currentThread().setContextClassLoader(Yalp.classloader);
            Yalp.detectChanges();
            if (!Yalp.started) {
                if (Yalp.mode == Mode.PROD) {
                    throw new UnexpectedException("Application is not started");
                }
                Yalp.start();
            }
            InvocationContext.current.set(getInvocationContext());
            return true;
View Full Code Here

        public void onException(Throwable e) {
            Yalp.pluginCollection.onInvocationException(e);
            if (e instanceof YalpException) {
                throw (YalpException) e;
            }
            throw new UnexpectedException(e);
        }
View Full Code Here

                plugin.enhance(applicationClass);
                if (Logger.isTraceEnabled()) {
                    Logger.trace("%sms to apply %s to %s", System.currentTimeMillis() - start, plugin, applicationClass.name);
                }
            } catch (Exception e) {
                throw new UnexpectedException("While applying " + plugin + " on " + applicationClass.name, e);
            }
        }
    }
View Full Code Here

    public File asFile(File file) {
        try {
            Files.copy(defaultFile, file);
            return file;
        } catch (Exception ex) {
            throw new UnexpectedException(ex);
        }
    }
View Full Code Here

    public InputStream asStream() {
        try {
            return new FileInputStream(defaultFile);
        } catch (IOException ex) {
            throw new UnexpectedException(ex);
        }
    }
View Full Code Here

                Model.Factory factory = Yalp.pluginCollection.modelFactory(clazz);
                if (factory != null) {
                    return factory;
                }
            }
            throw new UnexpectedException("Model " + clazz.getName() + " is not managed by any plugin");
        }
View Full Code Here

        }
        if (value.getClass().isArray()) {
            try {
                return java.lang.reflect.Array.getLength(value) > 0;
            } catch (Exception e) {
                throw new UnexpectedException(e);
            }
        }
        return true;
    }
View Full Code Here

    public static synchronized void resolve(int revision) {
        try {
            execute("update yalp_evolutions set state = 'applied' where state = 'applying_up' and id = " + revision);
            execute("delete from yalp_evolutions where state = 'applying_down' and id = " + revision);
        } catch (Exception e) {
            throw new UnexpectedException(e);
        }
    }
View Full Code Here

TOP

Related Classes of yalp.exceptions.UnexpectedException

Copyright © 2018 www.massapicom. 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.