public static class GoloCompilationException.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder(java.lang.String goloSourceFilename)
Makes a builder to report problems in a source file.
|
Modifier and Type | Method and Description |
---|---|
void |
doThrow()
Stops adding problems and throws the exception,
|
java.util.List<GoloCompilationException.Problem> |
getProblems() |
GoloCompilationException.Builder |
report(GoloCompilationException.Problem.Type type,
GoloASTNode source,
java.lang.String description)
Report a problem to the exception being built.
|
GoloCompilationException.Builder |
report(ParseException pe,
GoloASTNode source)
Report a parsing error problem to the exception being built.
|
GoloCompilationException.Builder |
report(java.nio.charset.UnsupportedCharsetException uce)
Report an encoding error problem to the exception being built.
|
public Builder(java.lang.String goloSourceFilename)
goloSourceFilename
- the source file name.public GoloCompilationException.Builder report(GoloCompilationException.Problem.Type type, GoloASTNode source, java.lang.String description)
type
- the problem type.source
- the problem source.description
- the problem description.public GoloCompilationException.Builder report(ParseException pe, GoloASTNode source)
pe
- the caught ParseException
.source
- the node of the ParseException
.public GoloCompilationException.Builder report(java.nio.charset.UnsupportedCharsetException uce)
uce
- the caught UnsupportedCharsetException
.public void doThrow() throws GoloCompilationException
GoloCompilationException
- everytime.public java.util.List<GoloCompilationException.Problem> getProblems()