Package org.codehaus.groovy.control.messages

Examples of org.codehaus.groovy.control.messages.ExceptionMessage


                Object ret = method.invoke(null, new Object[]{javacParameters});
                javacReturnValue = ((Integer) ret).intValue();
            }
            cu.getConfiguration().getOutput();
        } catch (Exception e) {
            cu.getErrorCollector().addFatalError(new ExceptionMessage(e, true, cu));
        }
        if (javacReturnValue!=0) {
            switch (javacReturnValue) {
                case 1: addJavacError("Compile error during compilation with javac.",cu,javacOutput); break;
                case 2: addJavacError("Invalid commandline usage for javac.",cu,javacOutput); break;
View Full Code Here


            cls = loader.loadClass(name, false, true);
        } catch (ClassNotFoundException cnfe) {
            cachedClasses.put(name, SCRIPT);
            return false;
        } catch (CompilationFailedException cfe) {
            compilationUnit.getErrorCollector().addErrorAndContinue(new ExceptionMessage(cfe, true, source));
            return false;
        }
        //TODO: the case of a NoClassDefFoundError needs a bit more research
        // a simple recompilation is not possible it seems. The current class
        // we are searching for is there, so we should mark that somehow.
View Full Code Here

        sb.append(super.getMessage() + "\n");
        List errors = getErrors(compilationFailedException);
        for (int i = 0; i < errors.size(); i++) {
            Object o = errors.get(i);
            if (o instanceof ExceptionMessage) {
                ExceptionMessage em = (ExceptionMessage) o;
                sb.append(em.getCause().getMessage() + "\n");
            }
        }
        return sb.toString();
    }
View Full Code Here

            cls = loader.loadClass(name, false, true);
        } catch (ClassNotFoundException cnfe) {
            cachedClasses.put(name, NO_CLASS);
            return resolveToScript(type);
        } catch (CompilationFailedException cfe) {
            compilationUnit.getErrorCollector().addErrorAndContinue(new ExceptionMessage(cfe, true, source));
            return resolveToScript(type);
        }
        //TODO: the case of a NoClassDefFoundError needs a bit more research
        // a simple recompilation is not possible it seems. The current class
        // we are searching for is there, so we should mark that somehow.
View Full Code Here

        failIfErrors();
    }


    public void addException(Exception cause, SourceUnit source) throws CompilationFailedException {
        addError(new ExceptionMessage(cause,configuration.getDebug(),source));
        failIfErrors();
    }
View Full Code Here

                }

                if (nestedCollector != null) {
                    getErrorCollector().addCollectorContents(nestedCollector);
                } else {
                    getErrorCollector().addError(new ExceptionMessage(e, configuration.getDebug(), this));
                }
            }
        }

        getErrorCollector().failIfErrors();
View Full Code Here

                }

                if (nestedCollector != null) {
                    getErrorCollector().addCollectorContents(nestedCollector);
                } else {
                    getErrorCollector().addError(new ExceptionMessage(e, configuration.getDebug(), this));
                }
            }
        }

        getErrorCollector().failIfErrors();
View Full Code Here

                Object ret = method.invoke(null, new Object[]{javacParameters});
                javacReturnValue = (Integer) ret;
            }
            cu.getConfiguration().getOutput();
        } catch (InvocationTargetException ite) {
            cu.getErrorCollector().addFatalError(new ExceptionMessage((Exception) ite.getCause(), true, cu));
        } catch (Exception e) {
            cu.getErrorCollector().addFatalError(new ExceptionMessage(e, true, cu));
        }
        if (javacReturnValue != 0) {
            switch (javacReturnValue) {
                case 1: addJavacError("Compile error during compilation with javac.", cu, javacOutput); break;
                case 2: addJavacError("Invalid commandline usage for javac.", cu, javacOutput); break;
View Full Code Here

        failIfErrors();
    }


    public void addException(Exception cause, SourceUnit source) throws CompilationFailedException {
        addError(new ExceptionMessage(cause,configuration.getDebug(),source));
        failIfErrors();
    }
View Full Code Here

            cls = loader.loadClass(name, false, true);
        } catch (ClassNotFoundException cnfe) {
            cachedClasses.put(name, NO_CLASS);
            return resolveToScript(type);
        } catch (CompilationFailedException cfe) {
            compilationUnit.getErrorCollector().addErrorAndContinue(new ExceptionMessage(cfe, true, source));
            return resolveToScript(type);
        }
        //TODO: the case of a NoClassDefFoundError needs a bit more research
        // a simple recompilation is not possible it seems. The current class
        // we are searching for is there, so we should mark that somehow.
View Full Code Here

TOP

Related Classes of org.codehaus.groovy.control.messages.ExceptionMessage

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.