@@ -0,0 +1,2117 @@
+package no.ssb.vtl.script.error;%0A%0A/*%0A * ========================LICENSE_START=================================%0A * Java VTL%0A * %25%25%0A * Copyright (C) 2016 - 2017 Hadrien Kohl%0A * %25%25%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A * =========================LICENSE_END==================================%0A */%0A%0Aimport org.antlr.v4.runtime.ParserRuleContext;%0A%0Aimport static com.google.common.base.Preconditions.checkNotNull;%0A%0A/**%0A * A %7B@link RuntimeException%7D that contains the context in which it happened.%0A */%0Apublic class ContextualRuntimeException extends RuntimeException %7B%0A%0A    private final ParserRuleContext context;%0A%0A    public ContextualRuntimeException(ParserRuleContext context) %7B%0A        this.context = checkNotNull(context);%0A    %7D%0A%0A    public ContextualRuntimeException(String message, ParserRuleContext context) %7B%0A        super(message);%0A        this.context = checkNotNull(context);%0A    %7D%0A%0A    public ContextualRuntimeException(String message, Throwable cause, ParserRuleContext context) %7B%0A        super(message, cause);%0A        this.context = checkNotNull(context);%0A    %7D%0A%0A    public ContextualRuntimeException(Throwable cause, ParserRuleContext context) %7B%0A        super(cause.getMessage(), cause);%0A        this.context = checkNotNull(context);%0A    %7D%0A%0A    public ContextualRuntimeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, ParserRuleContext context) %7B%0A        super(message, cause, enableSuppression, writableStackTrace);%0A        this.context = checkNotNull(context);%0A    %7D%0A%0A    public ParserRuleContext getContext() %7B%0A        return context;%0A    %7D%0A%7D%0A

Add a RuntimeException subclass that contains the context of the error