1 package org.simantics.scl.compiler.types.exceptions;
3 import java.util.Collection;
4 import java.util.Collections;
6 public class SCLTypeParseException extends Exception {
8 private static final long serialVersionUID = -8245068555543510452L;
10 Collection<Problem> problems;
12 public SCLTypeParseException(Collection<Problem> problems) {
13 super(toString(problems));
14 this.problems = problems;
17 public SCLTypeParseException(Problem problem) {
18 this(Collections.singleton(problem));
21 public Collection<Problem> getProblems() {
25 private static String toString(Collection<Problem> problems) {
26 StringBuilder b = new StringBuilder();
27 for(Problem problem : problems) {