Package play.exceptions

Examples of play.exceptions.UnexpectedException


        String storeClassName = Play.configuration.getProperty("play.search.store","play.modules.search.store.FilesystemStore");
        try {
            store = (Store) Class.forName(storeClassName).newInstance();
            store.start();
        } catch (Exception e) {
            throw new UnexpectedException("Could not intialize store",e);
        }
    }
View Full Code Here


    @Override
    public void onApplicationStop() {
        try {
            Search.shutdown();
        } catch (Exception e) {
            throw new UnexpectedException (e);
        }
    }
View Full Code Here

            for (QueryResult queryResult : results) {
                objects.add(queryResult.object);
            }
            return (List<T>) objects;
        } catch (Exception e) {
            throw new UnexpectedException(e);
        }
    }
View Full Code Here

            for (QueryResult queryResult : results) {
                objects.add(Long.parseLong(queryResult.id));
            }
            return objects;
        } catch (Exception e) {
            throw new UnexpectedException(e);
        }
    }
View Full Code Here

            topDocs = store.getIndexSearcher(clazz.getName()).search(luceneQuery, null, Integer.MAX_VALUE, getSort());
            return topDocs.totalHits;
        } catch (ParseException e) {
            throw new SearchException(e);
        } catch (Exception e) {
            throw new UnexpectedException(e);
        }
    }
View Full Code Here

            }
            return results;
        } catch (ParseException e) {
            throw new SearchException(e);
        } catch (Exception e) {
            throw new UnexpectedException(e);
        }
    }
View Full Code Here

    public InputStream inputstream() {
        try {
            return new FileInputStream(realFile);
        } catch (Exception e) {
            throw new UnexpectedException(e);
        }
    }
View Full Code Here

    public OutputStream outputstream() {
        try {
            return new FileOutputStream(realFile);
        } catch (Exception e) {
            throw new UnexpectedException(e);
        }
    }
View Full Code Here

    public String contentAsString() {
        try {
            return IO.readContentAsString(inputstream());
        } catch (Exception e) {
            throw new UnexpectedException(e);
        }
    }
View Full Code Here

    public void write(CharSequence string) {
        try {
            IO.writeContent(string, outputstream());
        } catch (Exception e) {
            throw new UnexpectedException(e);
        }
    }
View Full Code Here

TOP

Related Classes of play.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.