summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/yql/ProgramCompileException.java
blob: 32ab9d682e3bc3b44f74c07143d9f664ab04a75f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.yql;

import com.yahoo.processing.IllegalInputException;

class ProgramCompileException extends IllegalInputException {

    private Location sourceLocation;

    public ProgramCompileException(String message) {
        super(message);
    }

    public ProgramCompileException(Location sourceLocation, String message, Object... args) {
        super(String.format("%s %s", sourceLocation != null ? sourceLocation : "", args == null ? message : String.format(message, args)));
        this.sourceLocation = sourceLocation;
    }

}