Search in sources :

Example 11 with Message

use of org.codehaus.groovy.control.messages.Message in project spring-boot by spring-projects.

the class DependencyManagementBomTransformation method handleMalformedDependency.

private void handleMalformedDependency(Expression expression) {
    Message message = createSyntaxErrorMessage(String.format("The string must be of the form \"group:module:version\"%n"), expression);
    getSourceUnit().getErrorCollector().addErrorAndContinue(message);
}
Also used : Message(org.codehaus.groovy.control.messages.Message) SyntaxErrorMessage(org.codehaus.groovy.control.messages.SyntaxErrorMessage)

Example 12 with Message

use of org.codehaus.groovy.control.messages.Message in project spring-boot by spring-projects.

the class DependencyManagementBomTransformation method handleDuplicateDependencyManagementBomAnnotation.

private void handleDuplicateDependencyManagementBomAnnotation(AnnotationNode annotationNode) {
    Message message = createSyntaxErrorMessage("Duplicate @DependencyManagementBom annotation. It must be declared at most once.", annotationNode);
    getSourceUnit().getErrorCollector().addErrorAndContinue(message);
}
Also used : Message(org.codehaus.groovy.control.messages.Message) SyntaxErrorMessage(org.codehaus.groovy.control.messages.SyntaxErrorMessage)

Aggregations

Message (org.codehaus.groovy.control.messages.Message)12 SyntaxErrorMessage (org.codehaus.groovy.control.messages.SyntaxErrorMessage)12 ExceptionMessage (org.codehaus.groovy.control.messages.ExceptionMessage)6 LocatedMessage (org.codehaus.groovy.control.messages.LocatedMessage)6 WarningMessage (org.codehaus.groovy.control.messages.WarningMessage)6 SyntaxException (org.codehaus.groovy.syntax.SyntaxException)5 MismatchedCharException (antlr.MismatchedCharException)2 MismatchedTokenException (antlr.MismatchedTokenException)2 NoViableAltException (antlr.NoViableAltException)2 NoViableAltForCharException (antlr.NoViableAltForCharException)2 GroovyShell (groovy.lang.GroovyShell)2 Script (groovy.lang.Script)2 Iterator (java.util.Iterator)2 SimpleMessage (org.codehaus.groovy.control.messages.SimpleMessage)2 Binding (groovy.lang.Binding)1 CompileStatic (groovy.transform.CompileStatic)1 File (java.io.File)1 IOException (java.io.IOException)1 URLClassLoader (java.net.URLClassLoader)1 ArrayList (java.util.ArrayList)1