Package com.documents4j.throwables

Examples of com.documents4j.throwables.ConverterException


        try {
            return schedule().get();
        } catch (InterruptedException e) {
            // Note: In a future version, this call will be inlined into the calling thread.
            // Than this exception can become more specific.
            throw new ConverterException("Conversion was interrupted before it completed", e);
        } catch (ExecutionException e) {
            // All exceptions are caught and transformed into runtime exceptions.
            throw (RuntimeException) e.getCause();
        }
    }
View Full Code Here


                onSourceConsumed(source);
            }
            if (isCancelled()) {
                return;
            } else if (!conversionSuccessful) {
                throw new ConverterException("Conversion failed for an unknown reason");
            } // else:
            // If the conversion concluded successfully, rename the resulting file if neccessary, invoke the callback
            // on this event and signal that the pending lock can be released.
            onConversionFinished(conversionContext);
            releasePendingState = true;
View Full Code Here

    private RuntimeException processException(Exception e) {
        if (e instanceof ExecutionException) {
            return processException((Exception) e.getCause());
        } else if (e instanceof InterruptedException) {
            return new ConverterException("The conversion did not complete in time", e);
        } else if (!(e instanceof RuntimeException)) {
            return new ConverterException("The conversion failed for an unexpected reason", e);
        } else {
            return (RuntimeException) e;
        }
    }
View Full Code Here

            } catch (RuntimeException e) {
                runtimeExceptions.add(e);
            }
        }
        if (runtimeExceptions.size() > 0) {
            throw new ConverterException("Could not shut down at least one external converter: " + runtimeExceptions);
        }
    }
View Full Code Here

TOP

Related Classes of com.documents4j.throwables.ConverterException

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.