diff options
author | Jon Bratseth <bratseth@gmail.com> | 2021-09-21 20:14:24 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2021-09-21 20:14:24 +0200 |
commit | ee2c13fa406f1a1098f17614dd82f037867023a9 (patch) | |
tree | e5786ac1906333184af4efe3d0bb1414a942b1e8 /container-search/src | |
parent | 56df7e99193077dd2af05a7405300915caffc10e (diff) |
YQL programCompileExceptions are IllegalInputExceptions
This will avoid returning stack traces on illegal YQL input.
Diffstat (limited to 'container-search/src')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/yql/ProgramCompileException.java | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/yql/ProgramCompileException.java b/container-search/src/main/java/com/yahoo/search/yql/ProgramCompileException.java index 46dfb780e2d..32ab9d682e3 100644 --- a/container-search/src/main/java/com/yahoo/search/yql/ProgramCompileException.java +++ b/container-search/src/main/java/com/yahoo/search/yql/ProgramCompileException.java @@ -1,7 +1,9 @@ // 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; -class ProgramCompileException extends RuntimeException { +import com.yahoo.processing.IllegalInputException; + +class ProgramCompileException extends IllegalInputException { private Location sourceLocation; @@ -9,27 +11,6 @@ class ProgramCompileException extends RuntimeException { super(message); } - public ProgramCompileException(String message, Object... args) { - super(formatMessage(message, args)); - } - - private static String formatMessage(String message, Object... args) { - return args == null ? message : String.format(message, args); - } - - public ProgramCompileException(String message, Throwable cause) { - super(message, cause); - } - - public ProgramCompileException(Throwable cause) { - super(cause); - } - - public ProgramCompileException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } - - 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; |